Skip to content

Commit fed81dd

Browse files
ljpsichuanuniversity100askwzzc-dev
authored
add entrypoint cmd (#10)
* feat(dockerfile):update dockerfile support riscv64 * support postgresql service * support yum install postgresql * add entrypoint cmd --------- Co-authored-by: 100ask <[email protected]> Co-authored-by: Chuang <[email protected]>
1 parent 33a9a87 commit fed81dd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ WORKDIR /tools
55
# 安装依赖
66
RUN yum -y install util-linux dos2unix
77

8+
RUN yum -y install postgresql postgresql-server \
9+
&&mkdir /data\
10+
&&chown -R postgres /data\
11+
&&chown -R postgres /tools
12+
813
ENV TZ=Asia/Shanghai
914

1015
COPY ./update-pg-password.sh /usr/local/bin
@@ -17,12 +22,9 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
1722
RUN chmod +x /usr/local/bin/update-pg-password.sh
1823
RUN chmod +x /docker-entrypoint-initdb.d/10_eulixspace.sh
1924

25+
ENTRYPOINT ["docker-entrypoint.sh"]
2026

21-
RUN yum -y install postgresql postgresql-server \
22-
&&mkdir /data\
23-
&&chown -R postgres /data\
24-
&&chown -R postgres /tools
27+
STOPSIGNAL SIGINT
2528

26-
USER postgres
27-
RUN initdb -D /data \
28-
&&pg_ctl -D /data/ -l /data/logfile start
29+
EXPOSE 5432
30+
CMD ["postgres"]

0 commit comments

Comments
 (0)