Skip to content

Commit

Permalink
postgresql support (#13)
Browse files Browse the repository at this point in the history
* feat(dockerfile):update dockerfile support riscv64

* support yum install postgresql

* add entrypoint cmd

* support su-exec
---------

Co-authored-by: 100ask <[email protected]>
Co-authored-by: Chuang <[email protected]>
  • Loading branch information
3 people authored Jan 26, 2024
1 parent fed81dd commit ec48200
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
FROM xfan1024/openeuler:23.03-light
RUN mkdir /tools
WORKDIR /tools

# 安装依赖
RUN yum -y install util-linux dos2unix

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
&&chown -R postgres /tools

ENV TZ=Asia/Shanghai

Expand All @@ -19,9 +23,11 @@ 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 +x /usr/local/bin/update-pg-password.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
Expand Down

0 comments on commit ec48200

Please sign in to comment.