question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: failed to reach build target api_platform_php in Dockerfile

See original GitHub issue

Hello,

I would like to install the distribution 2.3.4, but I have a problem when I run : docker-compose up -d

The error :

Step 23/33 : VOLUME /srv/api/var —> Running in 6ada260490ac —> 54d855296991 Removing intermediate container 6ada260490ac Step 24/33 : COPY docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint —> a14e83eac9fa Removing intermediate container 1ebf915ec3c5 Step 25/33 : RUN chmod +x /usr/local/bin/docker-entrypoint —> Running in e97de244bb4a —> 19dae1d4e434 Removing intermediate container e97de244bb4a Step 26/33 : ENTRYPOINT docker-entrypoint —> Running in 80176aa48243 —> 8aad8269ed38 Removing intermediate container 80176aa48243 Step 27/33 : CMD php-fpm —> Running in 603ee08826c6 —> 9d13e50d64ce Removing intermediate container 603ee08826c6 Step 28/33 : FROM nginx:${NGINX_VERSION}-alpine AS api_platform_nginx —> 6884a281e9a4 Step 29/33 : COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf —> 4eacfbbe7aaa Removing intermediate container 2d463003c7aa Step 30/33 : WORKDIR /srv/api —> a4eb8a8fd79f Removing intermediate container 14d11d05caea Step 31/33 : COPY --from=api_platform_php /srv/api/public public/ —> 9339ba28b182 Removing intermediate container 7b566a9e43ee Step 32/33 : FROM cooptilleuls/varnish:${VARNISH_VERSION}-alpine AS api_platform_varnish —> b3e1e0e9ebcc Step 33/33 : COPY docker/varnish/conf/default.vcl /usr/local/etc/varnish/default.vcl —> f165a3d64faf Removing intermediate container ecc65d8cad4e ERROR: Service ‘php’ failed to build: failed to reach build target api_platform_php in Dockerfile

I also tested with the git version, everything starts correctly but only the php service does not seem to exist. When I try: docker-compose exec bin php/console d:s:u --force Return that the php service is not found

Would you have a solution?

Thanks !

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Janakcommented, Dec 28, 2018
1reaction
tabokcommented, Sep 6, 2019

Ech, I had the same issue on my Linux Mint.

That’s because I had installed older docker engine (16.X) but docker-compose 3.4 requires version 17.09.0+

sudo apt-get upgrade docker

Solved my problem. I hope it’ll be helpful for someone else too, cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

failed to reach build target <stage> in Dockerfile" only during ...
Reading the Docker source code, it seems like this error message occurs if the Dockerfile does not have the stage specified by your...
Read more >
Docker build first stage in multi stage pipeline
Sending build context to Docker daemon 49.99MB Error response from daemon: failed to reach build target 0 in Dockerfile.
Read more >
Deploying to a Kubernetes Cluster - API Platform
docker build -t gcr.io/test-api-platform/php:0.1.0 -t ... If the pods do not run, and you get the following error from google kubernetes engine logs, ......
Read more >
A brand new website interface for an even better experience!
Error : failed to reach build target api_platform_php in Dockerfile.
Read more >
Dockerfile fails to build (#2373) · Issues - GitLab
Sending build context to Docker daemon 31.8 MB Step 1/10 : FROM golang:1.7 ... recipe for target 'test' failed make: *** [test] Error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found