-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (48 loc) · 1.56 KB
/
Dockerfile
File metadata and controls
61 lines (48 loc) · 1.56 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM ubuntu:16.04
ARG POSTGRES_VERSION
RUN echo "POSTGRES_VERSION="${POSTGRES_VERSION}
RUN \
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
touch /etc/libnss-ldap.conf /etc/pam_ldap.conf && \
apt-get -qq update && \
DEBIAN_FRONTEND=noninteractive \
apt-get -qq install --yes \
curl \
wget \
grep \
sed \
git \
bzip2 zip unzip \
gettext \
sudo \
ca-certificates \
fortune \
libnss-ldap ldap-utils \
openssh-server \
locales && \
apt-get clean all
RUN export LANGUAGE=en_US.UTF-8 && \
export LANG=en_US.UTF-8 && \
export LC_ALL=en_US.UTF-8 && \
locale-gen en_US.UTF-8 && \
DEBIAN_FRONTEND=noninteractive \
dpkg-reconfigure locales && \
echo 'export LC_ALL="en_US.UTF-8"'>> /etc/profile
RUN echo "POSTGRES_VERSION="${POSTGRES_VERSION}
RUN \
export CODENAME=$(cat /etc/lsb-release| grep '^DISTRIB_CODENAME=' | awk -F= '{print $2}') && \
echo "deb http://apt.postgresql.org/pub/repos/apt/ ${CODENAME}-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install --yes \
postgresql-client-${POSTGRES_VERSION} && \
apt-get clean all
RUN mkdir /var/run/sshd
COPY config/sshd_config.template /etc/ssh/sshd_config.template
COPY config/nsswitch.conf /etc/nsswitch.conf
COPY config/sshd /etc/pam.d/sshd
RUN mkdir /ssh-keys
RUN mkdir /workdir
COPY docker-entrypoint.sh .
RUN chmod u+x docker-entrypoint.sh
ENTRYPOINT ["./docker-entrypoint.sh"]