Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/riscv64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Dockerfile
Expand Down
31 changes: 26 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
FROM postgres:12.16-alpine3.18

RUN apk --no-cache add tzdata dos2unix
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

Expand All @@ -11,5 +23,14 @@ 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 +x /docker-entrypoint-initdb.d/10_eulixspace.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"]