firecat53 / dockerfiles

Dockerfiles: Gollum, Jackett, Miniflux, Nginx/PHP-FPM, Plex, Privatebin, Qbittorrent, Radarr, Sabnzbd, Samba, SSH Socks Proxy server, Sonarr, Syncthing, Transmission, Unifi Controller.
MIT License
626 stars 93 forks source link

container omd_config not found #10

Closed jmreicha closed 9 years ago

jmreicha commented 9 years ago

Following the instructions in the README I get to the second step but get the following error when running the docker run command - docker run --volumes-from omd_config -v $(pwd):/home -it ubuntu /bin/bash.

FATA[0000] Error response from daemon: container omd_config not found, impossible to mount its volumes

The container seems to have built okay and the first docker run command looks like it was okay also.

Docker version is 1.5 on Ubuntu 14.04.

firecat53 commented 9 years ago

Did you run the 2nd command that builds the data-only volume?

docker run -v /opt/omd/sites -v /config --name omd_config scratch true &> /dev/null

You might have to use a different image than scratch (such as busybox) because that name is reserved right now.

You can check if you have the data container by running docker ps -a and looking for the omd_config container.

Scott

jmreicha commented 9 years ago

It appears to run but there is no history of it with docker ps -a so it looks like something is up.

firecat53 commented 9 years ago

Try running the command without the redirection to /dev/null and use the busybox image in place of scratch.

firecat53 commented 9 years ago

Another option is to store the omd config someplace in your 'real' filesystem instead of a container. In that case, you would run the omd container like:

docker run -d -v <path/to/your/omdconfig>:/config -v <path/to/omd/sites>:/opt/omd/sites -v /etc/localtime:/etc/localtime -p 5000:5000 --name omd_run omd
jmreicha commented 9 years ago

Getting farther. I was able to get the volume container to work with

docker run -v /opt/omd/sites -v /config --name omd_config busybox

I run the third step and it seems to be getting stuck on start.sh.

docker logs -f omd_run                                                                                                                                                  [21:26:23]
chgrp: cannot access '/config/msmtp*': No such file or directory
chmod: cannot access '/config/msmtprc': No such file or directory
Group 'omd' already existing.
omd: no such site: omd
omd: no such site: omd
omd: no such site: omd
tail: cannot open '/opt/omd/sites/monitoring/var/log/nagios.log' for reading: No such file or directory
firecat53 commented 9 years ago

Did you follow the last step of the 'Build' section in the README for adding your own smtp info and copying that into the container?

jmreicha commented 9 years ago

Yep. Missed the copy command the first time, that took car of the first errors. Still seeing the following:

docker logs -f omd_run                                                                                                                                                  [21:32:03]
Group 'omd' already existing.
omd: no such site: omd
omd: no such site: omd
omd: no such site: omd
tail: cannot open '/opt/omd/sites/monitoring/var/log/nagios.log' for reading: No such file or directory

I can probably just hack up the script to get it going but figured I would post errors here first.

firecat53 commented 9 years ago

Ah, I think I found the error. Try editing start.sh so the last line reads:

tail -f "/opt/omd/sites/$SITE/var/log/nagios.log"

I had the tail command reading the name of the the OMD site that I use.

If that doesn't work, try running the container with '-it --rm' instead of '-d' and '/bin/bash' at the end of the command, then run each command in /start.sh one at a time and see where it fails.

firecat53 commented 9 years ago

Oops..another issue. Change the 'SITE=omd' in start.sh to something else. Apparently it doesn't like using the name 'omd' for a site name. I guess when I initially used 'monitoring' I didn't have any troubles :)

jmreicha commented 9 years ago

Ha, I just figured that one out :)

I changed the variable to 'default` in the start script and it is working now.

firecat53 commented 9 years ago

Cool! Gratifying to know someone else besides me is able to make it work :) I'll leave this open for awhile in case you have any more questions.

firecat53 commented 9 years ago

Closing...solved.