我有这个简单的docker文件:
FROM richarvey/nginx-php-fpm
RUN mv /var/www/html/index.php /var/www/html/info.php
ADD dist/ /var/www/html/
我用这个命令构建它:
docker build -t mydockerimage .
但是当我检查时,/var/www/html/index.php
仍在那里,但我打算将其重命名为/var/www/html/info.php
。
每次重建图像时,我也会清除缓存的图像。
有人可以指出我为什么会那样?
编辑#1
time="2017-04-25T22:01:48+08:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not avail
able on Windows"
Sending build context to Docker daemon 89.73 MB
Step 1/3 : FROM richarvey/nginx-php-fpm
---> d1db840b1d7d
Step 2/3 : RUN mv /var/www/html/index.php /var/www/html/info.php
---> Running in ca7db6008c64
---> 203246f59783
Removing intermediate container ca7db6008c64
Step 3/3 : ADD dist/ /var/www/html/
---> 4dcb74384b35
Removing intermediate container 0c99b349e9c0
Successfully built 4dcb74384b35
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added
to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files a
nd directories.