-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (18 loc) · 937 Bytes
/
Dockerfile
File metadata and controls
20 lines (18 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM postgres:latest
COPY files/docker-entrypoint.sh /docker-entrypoint.sh
COPY . /etc/puppetlabs/code/environments/production/modules/secure_postgres
RUN cp /usr/share/postgresql/postgresql.conf.sample /etc/postgresql/postgresql.conf && \
apt-get -y update && \
apt-get install -y wget && \
wget https://apt.puppetlabs.com/puppet5-release-stretch.deb && \
dpkg -i puppet5-release-stretch.deb && \
apt-get -y update && \
apt-get -y install puppet-agent && \
/opt/puppetlabs/bin/puppet module install puppetlabs-stdlib && \
/opt/puppetlabs/bin/puppet apply -e "class { '::secure_postgres': postgresql_conf => '/etc/postgresql/postgresql.conf' }" && \
rm -rf /opt/puppetlabs/puppet/cache && \
rm -rf /etc/puppetlabs/code/environments/production/modules && \
apt-get remove --purge -y wget puppet-agent && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*