wuliya commited on
Commit
6139289
·
unverified ·
1 Parent(s): 0940906

build(Dockerfile): 更新构建流程并添加 pyproject.toml

Browse files

- 在用户创建后设置工作目录为 /app
- 移除不必要的 ls 命令
- 添加 curl 命令从 GitHub 获取 pyproject.toml 文件
- 保持其他构建步骤不变

Files changed (1) hide show
  1. Dockerfile +7 -6
Dockerfile CHANGED
@@ -1,16 +1,17 @@
1
- FROM shiwuliya/meme:latest
2
 
3
  RUN useradd -m -u 1000 user
4
  USER user
5
 
 
 
6
  RUN curl -sSL https://install.python-poetry.org | python3 -
7
 
8
  ENV PATH="${PATH}:/home/user/.local/bin" \
9
  PORT="7860"
10
-
11
- WORKDIR /app
12
- RUN ls /app/
13
-
14
- RUN poetry install
15
 
16
  EXPOSE $PORT
 
1
+ FROM shiwuliya/meme-generator:latest
2
 
3
  RUN useradd -m -u 1000 user
4
  USER user
5
 
6
+ WORKDIR /app
7
+
8
  RUN curl -sSL https://install.python-poetry.org | python3 -
9
 
10
  ENV PATH="${PATH}:/home/user/.local/bin" \
11
  PORT="7860"
12
+
13
+ RUN mkdir -p /home/user/.config/meme_generator && \
14
+ chown -R user:user /home/user/.config/meme_generator
15
+ RUN poetry install
 
16
 
17
  EXPOSE $PORT