I\'m not able to find many examples of what a .dockerignore file should look like.
Using puppet to install a few packages on a docker container causes the image to
.dockerignore
is to prevent files from being added to the initial build context that is sent to the docker daemon when you do docker build
, it doesn't create a global rule for excluding files from being created in all images generated by a Dockerfile.
It's important to note that each RUN
statement will generate a new image, with the parent of that image being the image generated by the Dockerfile statement above it. Try collapsing your RUN
statements into a single one to reduce image size:
RUN librarian-puppet install &&\
puppet apply --modulepath=/modules -e "class { 'buildslave': jenkins_slave => true,}" &&\
librarian-puppet clean