Skip to content

Commit ec48200

Browse files
ljpsichuanuniversity100askwzzc-dev
authored
postgresql support (#13)
* feat(dockerfile):update dockerfile support riscv64 * support yum install postgresql * add entrypoint cmd * support su-exec --------- Co-authored-by: 100ask <user@100ask.com> Co-authored-by: Chuang <zhichuang@iscas.ac.cn>
1 parent fed81dd commit ec48200

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
FROM xfan1024/openeuler:23.03-light
22
RUN mkdir /tools
33
WORKDIR /tools
4-
54
# 安装依赖
6-
RUN yum -y install util-linux dos2unix
7-
5+
RUN yum -y install util-linux dos2unix gcc make unzip wget\
6+
&& wget https://github.com/ncopa/su-exec/archive/master.zip\
7+
&& unzip master.zip\
8+
&& cd su-exec-master\
9+
&& make\
10+
&& cp su-exec /usr/local/bin/
11+
812
RUN yum -y install postgresql postgresql-server \
913
&&mkdir /data\
1014
&&chown -R postgres /data\
11-
&&chown -R postgres /tools
15+
&&chown -R postgres /tools
1216

1317
ENV TZ=Asia/Shanghai
1418

@@ -19,9 +23,11 @@ COPY docker-entrypoint.sh /usr/local/bin
1923
RUN dos2unix -k /usr/local/bin/update-pg-password.sh /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/10_eulixspace.sh
2024

2125
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
22-
RUN chmod +x /usr/local/bin/update-pg-password.sh
26+
RUN chmod 777 /usr/local/bin/update-pg-password.sh
2327
RUN chmod +x /docker-entrypoint-initdb.d/10_eulixspace.sh
28+
RUN chmod +x /usr/local/bin/su-exec
2429

30+
RUN chown -R postgres /usr/local/bin/docker-entrypoint.sh
2531
ENTRYPOINT ["docker-entrypoint.sh"]
2632

2733
STOPSIGNAL SIGINT

0 commit comments

Comments
 (0)