forked from ao-space/space-postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 1.07 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
FROM xfan1024/openeuler:23.03-light
RUN mkdir /tools
WORKDIR /tools
# 安装依赖
RUN yum -y install util-linux dos2unix gcc make unzip wget\
&& wget https://github.com/ncopa/su-exec/archive/master.zip\
&& unzip master.zip\
&& cd su-exec-master\
&& make\
&& cp su-exec /usr/local/bin/
RUN yum -y install postgresql postgresql-server \
&&mkdir /data\
&&chown -R postgres /data\
&&chown -R postgres /tools
ENV TZ=Asia/Shanghai
COPY ./update-pg-password.sh /usr/local/bin
COPY eulixspace_pgsql_init.sh /docker-entrypoint-initdb.d/10_eulixspace.sh
COPY docker-entrypoint.sh /usr/local/bin
RUN dos2unix -k /usr/local/bin/update-pg-password.sh /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/10_eulixspace.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
RUN chmod 777 /usr/local/bin/update-pg-password.sh
RUN chmod +x /docker-entrypoint-initdb.d/10_eulixspace.sh
RUN chmod +x /usr/local/bin/su-exec
RUN chown -R postgres /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
STOPSIGNAL SIGINT
EXPOSE 5432
CMD ["postgres"]