-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
54 lines (44 loc) · 2.18 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:20.04
LABEL maintainer="[email protected]" \
version="12.3" \
description="1C modification of PostgreSQL ver 12.3 1C"
ENV POSTGRES_USER=postgres \
POSTGRES_PASSWORD=password \
PGDATA="/var/postgresql-1c/12/data"
ENV LANG=uk_UA.UTF-8 LANGUAGE=ru
ENV LC_ALL=${LANG} \
PATH="/opt/pgpro/1c-12/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
WORKDIR /root
RUN DEBIAN_FRONTEND=noninteractive \
sed -i 's/^deb http:\/\/archive/deb http:\/\/ua.archive/g' /etc/apt/sources.list &&\
apt-get -y -q update &&\
apt-get -y -q install dialog apt-utils &&\
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections &&\
apt-get -y -q install net-tools htop sudo less mc iputils-ping vim-tiny curl gnupg2 locales locales-all gosu tzdata >/dev/null 2>&1 &&\
ln -s /usr/bin/vim.tiny /usr/bin/vim &&\
/usr/sbin/locale-gen ${LANG} ru_RU.UTF-8 ru_UA.UTF-8 uk_UA.UTF-8 &&\
echo "LANG=\"${LANG}\"\nLANGUAGE=\"${LANGUAGE}\"" > /etc/default/locale &&\
ln -fs /usr/share/zoneinfo/Europe/Kiev /etc/localtime &&\
dpkg-reconfigure --frontend noninteractive tzdata >/dev/null 2>&1 &&\
apt-get -y -q upgrade &&\
apt-get -y -q autoremove &&\
curl -o apt-repo-add.sh http://repo.postgrespro.ru/pg1c-12/keys/apt-repo-add.sh &&\
sh apt-repo-add.sh &&\
apt-get -y install postgrespro-1c-12-server
# RUN apt-get -y install ssh supervisor &&\
# sed -i 's/.*PermitRootLogin.*/PermitRootLogin yes/; s/^.*Port .*$/Port 2222/' /etc/ssh/sshd_config &&\
# sed -i 's/^root.*/root\:$6$8aLWJxueq4k5IsEU$hjkref5Z8LPjiEHuqgmQdsUY0bXAAm7x9jLFTxC\/LnsaBkSlTwk7emXXQhOXGkaUBS\/Ddtb56CMHmVwTwJoFy1\:18457\:0\:99999\:7\:\:\:/' /etc/shadow &&\
# mkdir /run/sshd &&\
# rm -rf /var/lib/apt/lists/*
# EXPOSE 2222:2222
COPY assets/supervisor /etc/supervisor
COPY assets/docker-entrypoint.sh /root/docker-entrypoint.sh
RUN rm -rf /var/lib/postgresql/12/main &&\
mkdir -p /var/log/postgresql &&\
echo "export PATH=\"${PATH}\"" >> /etc/environment
EXPOSE 5432
WORKDIR /
RUN ln -s /root/docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh", "postgres"]
#CMD ["/usr/bin/supervisord"]
#CMD ["ping", "www.google.com"]