Docker Community Forums

Share and learn in the Docker community.

Entrypoint problem, standard_init_linux.go:190:



FROM php:5-apache

COPY ./ /

RUN ["chmod", "+x", "/"]


echo "Hello World"


version: ‘3’

build: ./post
restart: always

start by
docker-compose up

and have

postgres_1 | standard_init_linux.go:190: exec user process caused “no such file or directory”

What is wrong???

(Ove "Lime" Lindström) #2


Maybe the PHP-image is not the best one to play around with this. :smiley:

Looking at the PHP Dockerfile ( you can see that they are using ENTRYPOINT ["docker-php-entrypoint"].

I usually put my entripoint scripts (depending on base image) in the directory /usr/local/bin/

Have a look at

I did a test with all your files in the same directory and that works like a charm. The only thing I did change was that my docker-compose.yml looks like this and does not build form the ./post directory.

version: '3'

    build: .
    restart: always


now i make

version: ‘3’

build: ./web
restart: always

set -e
if [ “${1#-}” != “1" ]; then set -- apache2-foreground "@”

exec “$@”


FROM php:5-apache

COPY ./ /usr/local/bin/

RUN [“chmod”, “+x”, “/usr/local/bin/”]

ENTRYPOINT ["/usr/local/bin/"]

dont work

docker@debian:~/test$ docker-compose up
WARNING: Found orphan containers (test_postgres_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Recreating test_php_1 … done
Attaching to test_php_1
test_php_1 exited with code 0


(Ove "Lime" Lindström) #4

In your first docker-compose, you named the service postgres and started the services. Then you changed the service name to php and tried to do a docker-compose up again. That leaves the service and container state of the previous one in an orphaned state, as it states in the error message.

To fix this, run the command docker-compose down --rmi all --remove-orphans

I have been thought to either do docker-compose build && docker-compose upor docker-compose --build up.

When running in a development environment, I like to use the --force-recreate flag also.


Its work for me, but how to start apache from ?