-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (26 loc) · 961 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM buildpack-deps:jessie-curl
LABEL maintainer "https://github.com/muccg/"
ARG ARG_PUPPET_VERSION
ARG ARG_LIBRARIAN_PUPPET_VERSION
ENV PUPPET_VERSION $ARG_PUPPET_VERSION
ENV LIBRARIAN_PUPPET_VERSION $ARG_LIBRARIAN_PUPPET_VERSION
RUN addgroup --gid 1000 puppet \
&& adduser --disabled-password --home /data --no-create-home --system -q --uid 1000 --ingroup puppet puppet \
&& mkdir /data \
&& chown puppet:puppet /data
RUN apt-get update && apt-get install -qy --no-install-recommends \
git \
ruby \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN echo "gem: --no-ri --no-rdoc" > ~/.gemrc
RUN gem install puppet -v ${PUPPET_VERSION}
RUN gem install librarian-puppet -v ${LIBRARIAN_PUPPET_VERSION}
VOLUME /data
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
USER puppet
ENV HOME /data
WORKDIR /data
EXPOSE 8140
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["puppetmaster"]