3

When I'm trying to build the docker file at: https://github.com/docker-library/php/blob/3f43309a0d5a427f54dc885e0812068ee767c03e/7.1/Dockerfile

command: docker build -t php_image .

I'm encontering the following error:

Step 14 : COPY docker-php-source /usr/local/bin/
lstat docker-php-source: no such file or directory

Could anybody help me to figure out something wrong here?

Thanks

2
  • make sure docker-php-source still exist on your directory Commented Jun 13, 2017 at 7:40
  • At the beginning, I also though the way and downloaded that file , then rebuilt the docker file. I still got the error for the next command since the docker-php-source can't be extract!!! Commented Jun 13, 2017 at 7:52

1 Answer 1

4

You don't have the proper context of the docker build.

Just clone the repo to be sure to have all the files (and its right permissions):

git clone https://github.com/docker-library/php
docker build . -t php_image

But if you need to customize that image, it's easier to make your own Dockerfile based on the official build:

FROM php:7
RUN #your commands 
RUN ...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.