Mysql: standard_init_linux.go:175: exec user process caused "exec format error"

Created on 20 Oct 2016  路  10Comments  路  Source: docker-library/mysql

docker version

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

OS: ubuntu 16.04

Run the mysql dockerfile get this error

panic: standard_init_linux.go:175: exec user process caused "exec format error"

any idea?

Most helpful comment

For googlers check the Sha-Bang on your Entrypoint and CMD scripts.

!/bin/bash

All 10 comments

That error usually means you're trying to run this amd64 image on a non-amd64 host (such as 32-bit or ARM).

For googlers check the Sha-Bang on your Entrypoint and CMD scripts.

!/bin/bash

Thanks @tianon I'm seeing this on a raspberry pi

Hello i am getting the same error,..
these are the logs and docekrfile i am using
logs : standard_init_linux.go:187: exec user process caused "exec format error"

FROM openjdk:8-jre

MAINTAINER krish

Define environment variables

ENV ARTIFACTORY_HOME=/opt/artifactory
ENV ARTIFACTORY_VERSION=5.4.6
ENV MIN_HEAP_SIZE="-Xms512m"
ENV MAX_HEAP_SIZE="-Xmx2g"

Create artifactory group and user

RUN groupadd -g 1000 artifactory
&& useradd -d "$ARTIFACTORY_HOME" -u 1000 -g 1000 -s /sbin/nologin artifactory

Install artifactory

RUN wget "https://api.bintray.com/content/jfrog/artifactory/jfrog-artifactory-oss-${ARTIFACTORY_VERSION}.zip;bt_package=jfrog-artifactory-oss-zip" &&
unzip "jfrog-artifactory-oss-${ARTIFACTORY_VERSION}.zip;bt_package=jfrog-artifactory-oss-zip" &&
mv artifactory-oss-${ARTIFACTORY_VERSION} $ARTIFACTORY_HOME &&
rm "jfrog-artifactory-oss-${ARTIFACTORY_VERSION}.zip;bt_package=jfrog-artifactory-oss-zip"

Define mountable directories

VOLUME $ARTIFACTORY_HOME/data
VOLUME $ARTIFACTORY_HOME/etc
VOLUME $ARTIFACTORY_HOME/logs
VOLUME $ARTIFACTORY_HOME/backup
VOLUME $ARTIFACTORY_HOME/access

Add initialization script

ADD entrypoint.sh /opt/artifactory/bin/entrypoint.sh

Modify script permissions

RUN chmod 755 /opt/artifactory/bin/entrypoint.sh

Change directories ownership to artifactory user and group

RUN chown -R artifactory:artifactory $ARTIFACTORY_HOME

Run the container as artifactory user

USER artifactory

Define default command

ENTRYPOINT ["/opt/artifactory/bin/entrypoint.sh"]

Expose port

EXPOSE 8081

@dmowcomber how you cleared this error can u help me bro

@vamsi248 as noted above, check the shebang on your entrypoint.sh script

I'm going to close this since it's an issue with usage/architecture, not the image.
In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow. Thanks!

entrypoint.sh script is this part of my image? Would you be more specific?
I fixed my etc/inid.d/docker script and doesn't help.

@Foxtrod89 The entrypoint is a command or file you can have in the Dockerfile to execute on first-run

If you're using the as-is official image then you might be encountering this error from trying to use an incorrect architecture, since these parameters are correctly configured by default:

https://github.com/docker-library/mysql/blob/68f5102a73d8df4d739c20c581518850350794f6/5.7/Dockerfile#L77

Which calls this script:

https://github.com/docker-library/mysql/blob/68f5102a73d8df4d739c20c581518850350794f6/5.7/docker-entrypoint.sh#L1

there is no entrypoint directive in my dockerfile https://hub.docker.com/r/staannoe/tracks/dockerfile

@vamsi248 I see you're using the openjdk image. If you're running on an Arm processor, you'll have to look for an arm equivalent of openjdk. This one might work for you https://hub.docker.com/r/arm64v8/openjdk

Was this page helpful?
0 / 5 - 0 ratings