Getting the Docker daemon to autostart with Arch
So I went the lazy route and am installing OwnCloud via docker - the only problem is that I can't seem to get Docker to work correctly.
I've installed the docker community package and done the systemctl enable and start commands. But when I try to run
docker run --name oc -p 80:80 -p 443:443 -d l3iggs/owncloud
I get a message saying that the docker daemon isn't running. If I start the Docker daemon manually via sudo docker -d before running the docker run command, it works.
Now, I want OwnCloud to fire up when the computer is booted, without my having to manually start it and leave the terminal open while it's running. I can't seem to find any info pertaining to Arch on this. I may be completely wrong here because it's the first time I've tried to user Docker, but is it even possible to autostart the Docker daemon?
About this post
- Posted
- Archived
- Score
- 3 · 100% up
- Kind
- Text
- ID
- 40ulut
5 comments
You can do
systemctl enable dockerto start it at boot, andsystemctl start dockerto start it for the current boot. EDIT: Also, why not justpacman -S owncloud?I did the systemctl enable and start docker but that doesn't seem to do anything for whatever reason, at least from what I can see.
I tried but got tired of messing with Apache and PHP. The ArchWiki suggets to try the docker, so I went that route.
It works well, other than having to manually start it. I just know I'm doing something dumb, but I can't figure out where I went wrong.
The
enablewon't work for the current session - only for future sessions. If it isn't working, you might be able to get a bit more info withsystemctl status docker.There is a flag in there which makes the container start on boot.
Add yourself to docker group and you'll be able to run docker without sudo.