fuliai commited on
Commit
12197af
1 Parent(s): 5e2e20b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -7
Dockerfile CHANGED
@@ -75,16 +75,12 @@ COPY run.sh ${WORKDIR}/run.sh
75
  COPY import-db.sh /docker-entrypoint-initdb.d/
76
  RUN chmod +x ${WORKDIR}/run.sh /docker-entrypoint-initdb.d/import-db.sh
77
 
78
- # 保留构建时变量
79
- ARG DUMP_URL
80
- ARG DUMP_PASSWORD
81
-
82
  # 更改现有的 postgres 用户 UID 和 GID 为 1000
83
  USER root
84
  RUN usermod -u 1000 postgres && groupmod -g 1000 postgres && \
85
- chown -R postgres:postgres /var/lib/postgresql && \
86
- chown -R postgres:postgres /var/run/postgresql
87
-
88
  # 切换到 postgres 用户
89
  USER postgres
90
 
 
75
  COPY import-db.sh /docker-entrypoint-initdb.d/
76
  RUN chmod +x ${WORKDIR}/run.sh /docker-entrypoint-initdb.d/import-db.sh
77
 
 
 
 
 
78
  # 更改现有的 postgres 用户 UID 和 GID 为 1000
79
  USER root
80
  RUN usermod -u 1000 postgres && groupmod -g 1000 postgres && \
81
+ chown -R postgres:postgres /var/lib/postgresql && chown -R postgres:postgres /var/run/postgresql && \
82
+ chown -R postgres:postgres $WORKDIR && mkdir -p $WORKDIR/backups && chmod -R 775 $WORKDIR/backups
83
+
84
  # 切换到 postgres 用户
85
  USER postgres
86