chinh
chinh

Reputation: 291

(Docker) Getting error: docker-php-source: no such file or directory when building docker file

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

Upvotes: 3

Views: 2061

Answers (1)

Robert
Robert

Reputation: 36843

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 ...

Upvotes: 4

Related Questions