-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·42 lines (26 loc) · 977 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
37
38
39
40
41
42
FROM node:boron
EXPOSE 3000
ARG NODE_ENV=production
RUN apt-get -yq update
RUN apt-get install -qqy wget git ssh vim
RUN wget https://apt.puppetlabs.com/puppetlabs-release-pc1-precise.deb
RUN dpkg -i puppetlabs-release-pc1-precise.deb
RUN apt-get -qqy update
RUN apt-get install -qqy puppet
RUN mkdir -p /etc/puppet/hieradata
RUN gem install r10k
# Configure manifests and modules
COPY puppet/site.pp /etc/puppet/manifests/
# Add Puppetfile
COPY puppet/Puppetfile /etc/puppet/
# Configure hiera
COPY puppet/hiera/hiera.yaml /etc/puppet/
COPY puppet/hiera/common.json /etc/puppet/hieradata/
# Run r10k
RUN PUPPETFILE=/etc/puppet/Puppetfile PUPPETFILE_DIR=/etc/puppet/modules/ r10k puppetfile install --verbose debug2 --color
# Run Puppet apply
RUN puppet apply --modulepath=/etc/puppet/modules/ --hiera_config /etc/puppet/hiera.yaml --verbose
WORKDIR /var/node/helloworld
RUN npm install
RUN chown -R nodejs:nodejs /var/node/helloworld
ENV NODE_ENV ${NODE_ENV}