-
-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from buyfakett/master
减小docker镜像
- Loading branch information
Showing
20 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.md | ||
.idea | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
FROM python:3.9.5-slim-buster | ||
FROM node:18-alpine as webui | ||
COPY . /app | ||
WORKDIR /app/fcb-fronted/ | ||
ENV NPM_CONFIG_LOGLEVEL=verbose | ||
RUN npm i | ||
RUN npm run build-only | ||
# 似乎需要把文件移动才能正常 | ||
RUN mv dist/logo_small.png dist/assets/ | ||
|
||
|
||
FROM python:3.9.5-alpine as FileCodeBox | ||
LABEL author="Lan" | ||
LABEL email="[email protected]" | ||
LABEL version="6" | ||
|
||
|
||
COPY . /app | ||
# 先安装依赖可以产生缓存 | ||
WORKDIR /app | ||
COPY requirements.txt /app | ||
RUN /usr/local/bin/python -m pip install --upgrade pip && pip install -r requirements.txt | ||
COPY ./backend/ /app | ||
COPY --from=webui /app/fcb-fronted/dist/ /app/dist | ||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | ||
RUN echo 'Asia/Shanghai' >/etc/timezone | ||
WORKDIR /app | ||
RUN pip install -r requirements.txt | ||
EXPOSE 12345 | ||
CMD ["python","main.py"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fa5aacf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@buyfakett