2

Let say this is an example of a Dockerfile

FROM ubuntu:12.04

MAINTAINER Kimbro Staken version: 0.1

RUN apt-get update && apt-get install -y apache2 && apt-get clean && rm -rf /var/lib/apt/lists/*

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2

EXPOSE 80

CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]

Here is my question: Do I run RUN apt-get update on the host PC or create an intermediate container and run on that and then commit it.

Paulie-C
  • 1,674
  • 1
  • 13
  • 29
ashiquzzaman33
  • 5,781
  • 5
  • 31
  • 42

1 Answers1

2

It will create intermediate container, run all those commands specified using RUN and then commit it.

Girdhar Sojitra
  • 648
  • 4
  • 14