Skip to content

Commit

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

Co-authored-by: 100ask <user@100ask.com>
  • Loading branch information
ljpsichuanuniversity and 100ask authored Jan 25, 2024
1 parent f3edb4c commit 33a9a87
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
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
19 changes: 16 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM postgres:12.16-alpine3.18
FROM xfan1024/openeuler:23.03-light
RUN mkdir /tools
WORKDIR /tools

RUN apk --no-cache add tzdata dos2unix
# 安装依赖
RUN yum -y install util-linux dos2unix

ENV TZ=Asia/Shanghai

Expand All @@ -12,4 +15,14 @@ RUN dos2unix -k /usr/local/bin/update-pg-password.sh /usr/local/bin/docker-entry

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 +x /docker-entrypoint-initdb.d/10_eulixspace.sh


RUN yum -y install postgresql postgresql-server \
&&mkdir /data\
&&chown -R postgres /data\
&&chown -R postgres /tools

USER postgres
RUN initdb -D /data \
&&pg_ctl -D /data/ -l /data/logfile start

0 comments on commit 33a9a87

Please sign in to comment.