docker-compose installed on the host machine via rpm-ostree gives an error at startup
Status: Downloaded newer image for docker.io/adminer:latest
Creating _adminer1_1 … error
ERROR: for _adminer1_1 Cannot create container for service adminer1: Invalid container name (adminer1_1), only [a-zA-Z0-9][a-zA-Z0-9.-] are allowed
ERROR: for adminer1 Cannot create container for service adminer1: Invalid container name (adminer1_1), only [a-zA-Z0-9][a-zA-Z0-9.-] are allowed
ERROR: Encountered errors while bringing up the project.
compose file:
version: ‘3.1’
db:
image: mysql:5.6
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
how to run docker and other services through the toolbox?
System has not been booted with systemd as init system (PID 1). Can’t operate.
Failed to connect to bus: Host is down
I really like silver blue, but everything is familiar at the workstation
I’m using docker-compose on Silverblue, we’ll try to found a solution to your problem.
My installation, moby-engine and docker-compose are installed with rpm-ostree.
You can run docker-compose directly on host, but I don’t feel it useful, I prefer running it inside toolbox, for that you need to prefix docker-compose with the command “flatpak-spawn --host” ( my alias: dkc='flatpak-spawn --host docker-compose" and dk=“flatpak-spawn --host docker”)
You’ll also have problems with volumes, you need to uses named volumes ( I don’t yet found a solution with host volume )
could you confirm you’ve installed docker with the moby-engine package with “rpm-ostree install” command ?
if yes, it’s surely because docker isn’t started, try to do a “systemctl start docker”
If you use everyday docker, I recommend to start it automatically with “systemctl enable docker”
I’m not sure it’s possible to uses daemon mode with docker-compose, for testing, uses only the non-daemon mode (without the -d argument).
After you’ve installed moby-engine + docker-compose, on host with rpm-ostree, you need to reboot.
Then, check if the « systemct enabled docker » was correctly understood with: « systemctl status docker »
Found what was the error
in the directory structure.
I ran docker-compose from my home directory with relative ~ /home paths.
Created a directory inside /var all ok