OzoneAsai commited on
Commit
2e95c5b
1 Parent(s): 6ee980f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ベースイメージとして公式のPythonイメージを使用
2
+ FROM python:3.9-slim
3
+
4
+ # 作業ディレクトリを設定
5
+ WORKDIR /app
6
+
7
+ # requirements.txtをコピーしてパッケージをインストール
8
+ COPY requirements.txt requirements.txt
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Redisをインストール
12
+ RUN apt-get update && apt-get install -y redis-server
13
+
14
+ # アプリケーションのコードをコピー
15
+ COPY . .
16
+
17
+
18
+ # Redisをバックグラウンドで起動してからアプリケーションを起動
19
+ CMD redis-server --daemonize yes && python app.py