Spaces:
Sleeping
Sleeping
Upload Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ベースイメージとして Node.js を使用
|
2 |
+
FROM node:18
|
3 |
+
|
4 |
+
# 作業ディレクトリを設定
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# ホストのファイルをコンテナにコピー
|
8 |
+
COPY . .
|
9 |
+
|
10 |
+
# translations ディレクトリを作成し、権限を設定
|
11 |
+
RUN mkdir -p /app/translations && chmod -R 777 /app/translations
|
12 |
+
RUN chmod -R 777 /app
|
13 |
+
|
14 |
+
# 依存関係をインストール(競合を無視)
|
15 |
+
RUN npm install --legacy-peer-deps
|
16 |
+
|
17 |
+
# OpenSSL の互換オプションを有効化
|
18 |
+
#ENV NODE_OPTIONS="--openssl-legacy-provider"
|
19 |
+
#RUN git clone https://github.com/champierre/handpose2scratch.git
|
20 |
+
#RUN sh handpose2scratch/install.sh
|
21 |
+
|
22 |
+
# コンテナの起動時にサーバーを実行
|
23 |
+
CMD ["npm", "start"]
|
24 |
+
|
25 |
+
# コンテナがリッスンするポート
|
26 |
+
EXPOSE 3000
|