Reputation: 5741
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.
Upvotes: 2
Views: 432
Reputation: 678
It will create intermediate container, run all those commands specified using RUN and then commit it.
Upvotes: 2