orztv commited on
Commit
816d6fd
·
1 Parent(s): ddf1b87
Files changed (1) hide show
  1. Dockerfile +10 -10
Dockerfile CHANGED
@@ -38,16 +38,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
38
  && apt-get clean \
39
  && rm -rf /var/lib/apt/lists/*
40
 
41
- # 创建环境变量文件
42
- RUN --mount=type=secret,id=POSTGRES_USER,mode=0444,required=true \
43
- --mount=type=secret,id=POSTGRES_PASSWORD,mode=0444,required=true \
44
- --mount=type=secret,id=POSTGRES_DB,mode=0444,required=true \
45
- --mount=type=secret,id=POSTGRESDB_HOST,mode=0444,required=true \
46
- echo "export DB_POSTGRESDB_HOST=$(cat /run/secrets/POSTGRESDB_HOST)" >> /home/pn/.env && \
47
- echo "export DB_POSTGRESDB_USER=$(cat /run/secrets/POSTGRES_USER)" >> /home/pn/.env && \
48
- echo "export DB_POSTGRESDB_PASSWORD=$(cat /run/secrets/POSTGRES_PASSWORD)" >> /home/pn/.env && \
49
- echo "export DB_POSTGRESDB_DATABASE=$(cat /run/secrets/POSTGRES_DB)" >> /home/pn/.env && \
50
- chown pn:pn /home/pn/.env
51
 
52
  # 创建工作目录
53
  WORKDIR /home/pn
 
38
  && apt-get clean \
39
  && rm -rf /var/lib/apt/lists/*
40
 
41
+ # # 创建环境变量文件
42
+ # RUN --mount=type=secret,id=POSTGRES_USER,mode=0444,required=true \
43
+ # --mount=type=secret,id=POSTGRES_PASSWORD,mode=0444,required=true \
44
+ # --mount=type=secret,id=POSTGRES_DB,mode=0444,required=true \
45
+ # --mount=type=secret,id=POSTGRESDB_HOST,mode=0444,required=true \
46
+ # echo "export DB_POSTGRESDB_HOST=$(cat /run/secrets/POSTGRESDB_HOST)" >> /home/pn/.env && \
47
+ # echo "export DB_POSTGRESDB_USER=$(cat /run/secrets/POSTGRES_USER)" >> /home/pn/.env && \
48
+ # echo "export DB_POSTGRESDB_PASSWORD=$(cat /run/secrets/POSTGRES_PASSWORD)" >> /home/pn/.env && \
49
+ # echo "export DB_POSTGRESDB_DATABASE=$(cat /run/secrets/POSTGRES_DB)" >> /home/pn/.env && \
50
+ # chown pn:pn /home/pn/.env
51
 
52
  # 创建工作目录
53
  WORKDIR /home/pn