New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Docker woe's!
I'm playing around with docker and i'm noticing a weird issue. When I run my container and specify the entrypoint script it runs fine.
root@sd-34204 ~]# docker run --interactive --tty --entrypoint=/entrypoint.sh jeromeza/znc [ .. ] Checking for list of available modules... [ >> ] ok [ .. ] Opening config [/znc-data/configs/znc.conf]... [ >> ] ok [ .. ] Loading global module [webadmin]... [ >> ] [/usr/local/lib/znc/webadmin.so] [ .. ] Binding to port [6667]... [ >> ] ok [ ** ] Loading user [admin] [ .. ] Loading user module [chansaver]... [ >> ] ok [ .. ] Loading user module [controlpanel]... [ >> ] ok [ .. ] Loading user module [perform]... [ >> ] ok [ ** ] Staying open for debugging [pid: 8] [ ** ] ZNC 1.6.1 - http://znc.in
BUT
When I run the container I see it adds a SPACE after the script name and then fails and exits...
[root@sd-34204 ~]# docker run -d -p 6667 -v $HOME/.znc:/znc-data jeromeza/znc 257dc47ac61f3ccfb1e3d7fb4aeea93350acfe6da32d94b3af62a193b0c8067b [root@sd-34204 ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 257dc47ac61f jeromeza/znc "/entrypoint.sh " 7 seconds ago Exited (1) 5 seconds ago cocky_sinoussi
For the life of me I can't figure out why!
Here's my Dockerfile
[root@sd-34204 docker-znc]# cat Dockerfile # version 1.6.1-1 # docker-version 1.8.2 FROM docker.io/centos MAINTAINER Jerome ENV ZNC_VERSION 1.6.1 RUN yum update -y \ && yum install gcc openssl openssl-devel wget sudo -y \ && yum group install "Development Tools" -y \ && mkdir -p /src \ && cd /src \ && wget "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz" \ && tar -zxf "znc-${ZNC_VERSION}.tar.gz" \ && cd "znc-${ZNC_VERSION}" \ && ./configure \ && make \ && make install \ && yum clean all \ && rm -rf /src* /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN useradd znc ADD docker-entrypoint.sh /entrypoint.sh ADD znc.conf.default /znc.conf.default RUN chmod 644 /znc.conf.default VOLUME /znc-data EXPOSE 6667 ENTRYPOINT ["/entrypoint.sh"] CMD [""]
Comments
Interestingly enough if I run the container with the -v flag it exits on start, if i use -tv it doesn't. Any idea why?
The next issue is why it's not surviving a reboot... Somehow it's getting a SIG 15... Any idea's?
What's in your entrypoint script?
@jaromeza
Try to remove the
CMD [""]
line and rebuild the image.