这是dockerfile中的命令-
RUN mkdir -p /var/log/f2b && chown -R root:root /var/log/f2b && touch /var/log/f2b/sql.log && touch /var/log/f2b/login.log && touch /var/log/auth.log && touch /var/log/cron.log
VOLUME /var/www/html/resources/cache /tmp /var/log/apache2 /var/log/f2b
似乎运行正常
Step 28/58 : RUN mkdir -p /var/log/f2b && chown -R root:root /var/log/f2b && touch /var/log/f2b/sql.log && touch /var/log/f2b/log.log && touch /var/log/auth.log && touch /var/log/cron.log
---> Running in fb4ce5a50c63
---> bdff7517a17d
但是在运行映像时-
ERROR No file(s) found for glob /var/log/f2b/sql.log
PS-即使删除了VOLUME命令,也不会在/ var / log / f2b中创建文件