Skip to content

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?

3 points5 comments
Open on Reddit
About this post
Posted
Archived
Score
3 · 100% up
Kind
Text
ID
40ulut

Author

13
posts
58
comments
0
media
View profile

5 comments

You can do systemctl enable docker to start it at boot, and systemctl start docker to start it for the current boot. EDIT: Also, why not just pacman -S owncloud?

1 points

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.

1 points

The enable won'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 with systemctl status docker.

1 points
docker run help

There is a flag in there which makes the container start on boot.

1 points

Add yourself to docker group and you'll be able to run docker without sudo.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.