首页 > 解决方案 > Allow to cache commands in Docker

问题描述

I am new to Docker, and tried to search, but couldnt find this topic... So, my question is the following. i.e. in Dockerfile is:

...
RUN apt-get -y install apache2 autoconf build-essential apache2-dev .... bunch of modules list here
...
RUN OTHER_COMMANDS
...

So, there is an issue after OTHER_COMMANDS, and I have to re-run the build process. However, it always takes 20 minutes to install apache2 and etc... Is there any way,to tell docker to skip that command (to use the previously build results) for that command? it it will not re-download/re-install apache2 and tons of modules over and over again from ground.

标签: dockerdockerfile

解决方案


推荐阅读