Docker Community Forums

Share and learn in the Docker community.

Panic: standard_init_linux.go:175: Exec user process caused "no such file or directory"


(Budspencer) #1

Hey there
trying to set up a custom image based on Alpine, with no luck for the moment.
Here is the error message :
panic: standard_init_linux.go:175: exec user process caused “no such file or directory” [recovered]
panic: standard_init_linux.go:175: exec user process caused “no such file or directory”

goroutine 1 [running, locked to thread]:
panic(0x7eacc0, 0xc820145500)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/urfave/cli.HandleAction.func1(0xc82011d2e8)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x38e
panic(0x7eacc0, 0xc820145500)
/usr/local/go/src/runtime/panic.go:443 +0x4e9
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0xc82011cbf8, 0xc82001e098, 0xc82011cd08)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x136
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0xc82005c820, 0x7f39b8461500, 0xc820145500)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x5b1
main.glob.func8(0xc82007a780, 0x0, 0x0)
/go/src/github.com/opencontainers/runc/main_unix.go:26 +0x68
reflect.Value.call(0x74f5c0, 0x900fe8, 0x13, 0x847308, 0x4, 0xc82011d268, 0x1, 0x1, 0x0, 0x0, …)
/usr/local/go/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x74f5c0, 0x900fe8, 0x13, 0xc82011d268, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:303 +0xb1
github.com/urfave/cli.HandleAction(0x74f5c0, 0x900fe8, 0xc82007a780, 0x0, 0x0)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x2ee
github.com/urfave/cli.Command.Run(0x84a1c8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8e02a0, 0x51, 0x0, …)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xfec
github.com/urfave/cli.(*App).Run(0xc820001680, 0xc82000a100, 0x2, 0x2, 0x0, 0x0)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0xaa4
main.main()
/go/src/github.com/opencontainers/runc/main.go:137 +0xe24

I’m on Ubuntu 16.04 LTS, docker version is
Client:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built: Tue Oct 11 18:29:41 2016
OS/Arch: linux/amd64

Server:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built: Tue Oct 11 18:29:41 2016
OS/Arch: linux/amd64

DockerFile :

FROM alpine:latest

RUN apk update
RUN apk upgrade
RUN apk update
RUN apk add python python-dev supervisor git apache2 pwgen wget unzip curl vim py-pip build-base
RUN apk add lighttpd php5-common php5-iconv php5-json php5-gd php5-curl php5-xml php5-pgsql php5-imap php5-cgi fcgi
RUN apk add php5-pdo php5-pdo_pgsql php5-soap php5-xmlrpc php5-posix php5-mcrypt php5-gettext php5-ldap php5-ctype php5-dom

RUN apk add --no-cache mysql-client

COPY automysqlbackup /usr/local/bin
RUN chmod +x /usr/local/bin/automysqlbackup

RUN pip install --upgrade pip virtualenv web.py argparse pyaml

RUN {
echo mysql-server mysql-server/data-dir select ‘’;
echo mysql-server mysql-server/root-pass password $mysql_root_password;
echo mysql-server mysql-server/re-root-pass password $mysql_root_password;
echo mysql-server mysql-server/remove-test-db select false;
echo phpmyadmin phpmyadmin/dbconfig-install boolean true;
echo phpmyadmin phpmyadmin/app-password-confirm password $mysql_root_password;
echo phpmyadmin phpmyadmin/mysql/admin-pass password $mysql_root_password;
echo phpmyadmin phpmyadmin/mysql/app-pass password $mysql_root_password;
echo phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2;
} \

&& apk update

Java Version

ENV JAVA_VERSION_MAJOR 8
ENV JAVA_VERSION_MINOR 45
ENV JAVA_VERSION_BUILD 14
ENV JAVA_PACKAGE jdk

Download and unarchive Java

RUN mkdir /opt && curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie"
http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz
| tar -xzf - -C /opt &&
ln -s /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} /opt/jdk &&
rm -rf /opt/jdk/src.zip
/opt/jdk/lib/missioncontrol
/opt/jdk/lib/visualvm
/opt/jdk/lib/javafx
/opt/jdk/jre/lib/plugin.jar
/opt/jdk/jre/lib/ext/jfxrt.jar
/opt/jdk/jre/bin/javaws
/opt/jdk/jre/lib/javaws.jar
/opt/jdk/jre/lib/desktop
/opt/jdk/jre/plugin
/opt/jdk/jre/lib/deploy

/opt/jdk/jre/lib/javafx
/opt/jdk/jre/lib/jfx
/opt/jdk/jre/lib/amd64/libdecora_sse.so
/opt/jdk/jre/lib/amd64/libprism_.so
/opt/jdk/jre/lib/amd64/libfxplugins.so
/opt/jdk/jre/lib/amd64/libglass.so
/opt/jdk/jre/lib/amd64/libgstreamer-lite.so
/opt/jdk/jre/lib/amd64/libjavafx
.so
/opt/jdk/jre/lib/amd64/libjfx*.so

Set environment

ENV JAVA_HOME /opt/jdk
ENV PATH ${PATH}:${JAVA_HOME}/bin

RUN apk add monit syslog-ng

COPY myApp /myApp
RUN chmod -R +x /myApp
WORKDIR myApp

COPY uptimerobot.sh /root/uptimerobot.sh
RUN chmod +x /root/uptimerobot.sh
RUN /bin/sh /root/uptimerobot.sh

COPY createdb.sh /root/createdb.sh
RUN chmod +x /root/createdb.sh

COPY settings4monit.sh /root/settings4monit.sh
RUN chmod +x /root/settings4monit.sh

COPY settings4syslog.sh /root/settings4syslog.sh
RUN chmod +x /root/settings4syslog.sh

COPY 00load-myApp.conf /root/00load-myApp.conf
COPY 000-default.conf /root/000-default.conf

COPY docker-entrypoint.sh /root/entrypoint.sh
RUN chmod +x /root/entrypoint.sh

COPY server.conf /root/server.conf
RUN chmod +x /root/server.conf

copy php.ini and mysql.conf

COPY php.ini /etc/php/7.0/apache2/php.ini
COPY mysqld.cnf /etc/mysql/mysql.conf.d/mysqld.cnf

EXPOSE 80 8080

COPY docker-entrypoint.sh /root/entrypoint.sh
ENTRYPOINT ["/root/entrypoint.sh"]
CMD [“bash”]

The build is successful but the error comes when I try to launch it :
docker run -it -p 12345:22 -p 88:8080 -h 127.0.0.1 --net=bridge -v “$trigram”:/var/lib/mysql --name myApp budspencer/myApp “$NEW”

I am new to Docker, every hint is welcome as how to solve this issue.
Thanks!


Panic: "no such file or directory" in Docker toolbox