Docker Community Forums

Share and learn in the Docker community.

Dockerfile resource re-download

docker

(Ajilraju) #1

I have a Dockerfile like this

FROM ubuntu
RUN apt-get update
RUN apt-get install -y apache2
RUN apt-get install -y apache2-utils
RUN apt-get clean
EXPOSE 80
CMD ["apache2ctl", "-D", "FOREGROUND"]

If I want to add too more content to the file like this

FROM ubuntu
RUN apt-get update
RUN apt-get install -y apache2
RUN apt-get install -y apache2-utils
RUN apt-get clean
EXPOSE 80
COPY ./public-html/ /usr/local/apache2/htdocs/
CMD ["apache2ctl", "-D", "FOREGROUND"]

I’m really confusing again I want to build this file it will re-download the ubuntu and apache2 or not