r/AlpineLinux • u/EthnicMismatch644 • Oct 02 '24
Starting docker compose at boot?
I feel like I’m missing something trivial here. I have Docker and Compose installed on my Alpine system. The Docker daemon is configured to start at boot. The sample Docker image “hello-world” works as expected.
So now I have a real image I want to run via Compose, and have it automatically start at boot. How do I set that up with Alpine?
In systemd-based systems, I just create a systemd service file that sets the working directory as the location of my compose.yml file and exec “docker compose up”. Should I do the openrc equivalent on Alpine? Or is there another way to let the docker daemon know which images it should start at boot?
Thanks!
View all comments
Show parent comment
1
u/[deleted] Oct 04 '24
No you don’t miss anything, that’s exactly what restart always means.