Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
8639abec
Unverified
Commit
8639abec
authored
Jan 25, 2024
by
Bowen Liang
Committed by
GitHub
Jan 25, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve api docker file and lock Debian version in base image tag (#2195)
parent
d5361b8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
Dockerfile
api/Dockerfile
+9
-7
No files found.
api/Dockerfile
View file @
8639abec
#
packages install st
age
#
base im
age
FROM
python:3.10-slim AS base
FROM
python:3.10-slim
-bookworm
AS base
LABEL
maintainer="takatost@gmail.com"
LABEL
maintainer="takatost@gmail.com"
# install packages
FROM
base as packages
RUN
apt-get update
\
RUN
apt-get update
\
&&
apt-get
install
-y
--no-install-recommends
gcc g++ python3-dev libc-dev libffi-dev
&&
apt-get
install
-y
--no-install-recommends
gcc g++ python3-dev libc-dev libffi-dev
...
@@ -10,9 +13,8 @@ COPY requirements.txt /requirements.txt
...
@@ -10,9 +13,8 @@ COPY requirements.txt /requirements.txt
RUN
pip
install
--prefix
=
/pkg
-r
requirements.txt
RUN
pip
install
--prefix
=
/pkg
-r
requirements.txt
# build stage
# production stage
FROM
python:3.10-slim AS builder
FROM
base AS production
ENV
FLASK_APP app.py
ENV
FLASK_APP app.py
ENV
EDITION SELF_HOSTED
ENV
EDITION SELF_HOSTED
...
@@ -30,11 +32,11 @@ ENV TZ UTC
...
@@ -30,11 +32,11 @@ ENV TZ UTC
WORKDIR
/app/api
WORKDIR
/app/api
RUN
apt-get update
\
RUN
apt-get update
\
&&
apt-get
install
-y
--no-install-recommends
bash
curl wget vim nodejs ffmpeg
\
&&
apt-get
install
-y
--no-install-recommends
curl wget vim nodejs ffmpeg
\
&&
apt-get autoremove
\
&&
apt-get autoremove
\
&&
rm
-rf
/var/lib/apt/lists/
*
&&
rm
-rf
/var/lib/apt/lists/
*
COPY
--from=
base
/pkg /usr/local
COPY
--from=
packages
/pkg /usr/local
COPY
. /app/api/
COPY
. /app/api/
COPY
docker/entrypoint.sh /entrypoint.sh
COPY
docker/entrypoint.sh /entrypoint.sh
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment