soiz1 commited on
Commit
bca2431
·
verified ·
1 Parent(s): bf06cb1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -1
Dockerfile CHANGED
@@ -30,9 +30,15 @@ RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
30
  # Runtime環境用イメージ
31
  FROM base
32
 
33
- # 作業ディレクトリの設定
 
 
34
  WORKDIR /usr/src/app
35
 
 
 
 
 
36
  # builderフェーズから依存関係をコピー
37
  COPY --from=builder /install /usr/local
38
 
 
30
  # Runtime環境用イメージ
31
  FROM base
32
 
33
+ # ユーザー作成と変更
34
+ RUN groupadd -r appgroup && useradd -r -g appgroup appuser
35
+ USER appuser
36
  WORKDIR /usr/src/app
37
 
38
+ # データベースファイルの権限調整
39
+ RUN chmod 777 /usr/src/app/app.db
40
+
41
+
42
  # builderフェーズから依存関係をコピー
43
  COPY --from=builder /install /usr/local
44