(Docker) Getting the error: docker-php-source: there is no such file or directory when creating the docker file

When I try to create a docker file in: https://github.com/docker-library/php/blob/3f43309a0d5a427f54dc885e0812068ee767c03e/7.1/Dockerfile

: docker build -t php_image .

I am executing the following error:

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

Can someone help me deal with something wrong?

thank

+4
source share
1 answer

You do not have the proper docker build context.

Just clone for the repo to have all the files (and its permissions):

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

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

FROM php:7
RUN #your commands 
RUN ...
+2
source

Source: https://habr.com/ru/post/1679107/


All Articles