Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Graphics generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
to-generator
Graphics generator
Commits
5d583017
Commit
5d583017
authored
Apr 3, 2023
by
Tomáš Valenta
Browse files
Options
Downloads
Patches
Plain Diff
improve + fix dockerfile
parent
cba9a5dc
No related branches found
No related tags found
No related merge requests found
Pipeline
#13542
failed
Jul 3, 2023
Stage: build
Changes
2
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+19
-7
19 additions, 7 deletions
Dockerfile
VERSION
+1
-1
1 addition, 1 deletion
VERSION
with
20 additions
and
8 deletions
Dockerfile
+
19
−
7
View file @
5d583017
FROM
python:3.10
FROM
python:3.10
as
base
RUN
mkdir
/app
# Setup env
WORKDIR
/app
ENV
LANG C.UTF-8
ENV
LC_ALL C.UTF-8
ENV
PYTHONDONTWRITEBYTECODE 1
ENV
PYTHONFAULTHANDLER 1
ENV
DEBIAN_FRONTEND noninteractive
RUN
curl
-fsSL
https://deb.nodesource.com/setup_19.x | bash -
FROM
base
AS
python-deps
RUN
apt-get
install
nodejs
&&
rm
-rf
/var/lib/apt/lists/
*
COPY
. .
# Install pipenv and compilation dependencies
# Install pipenv and compilation dependencies
RUN
pip
install
-U
virtualenv pipenv
RUN
pip
install
-U
virtualenv pipenv
...
@@ -19,9 +20,20 @@ COPY Pipfile.lock .
...
@@ -19,9 +20,20 @@ COPY Pipfile.lock .
RUN
PIPENV_VENV_IN_PROJECT
=
1 pipenv
install
--deploy
RUN
PIPENV_VENV_IN_PROJECT
=
1 pipenv
install
--deploy
RUN
PIPENV_VENV_IN_PROJECT
=
1 pipenv
install
gunicorn
RUN
PIPENV_VENV_IN_PROJECT
=
1 pipenv
install
gunicorn
FROM
base
AS
runtime
# Copy virtual env from python-deps stage
COPY
--from=python-deps /.venv /.venv
ENV
PATH="/.venv/bin:$PATH"
# Create app workdir
RUN
mkdir
/app
WORKDIR
/app
COPY
. .
RUN
bash
-c
"adduser --disabled-login --quiet --gecos app app &&
\
RUN
bash
-c
"adduser --disabled-login --quiet --gecos app app &&
\
chmod -R o+r /app/ &&
\
chmod -R o+r /app/ &&
\
chmod o+x /app/run.sh"
chmod o+x /app/run.sh"
USER
app
USER
app
# Expose main port
EXPOSE
8080
EXPOSE
8080
This diff is collapsed.
Click to expand it.
VERSION
+
1
−
1
View file @
5d583017
1.6.
6
1.6.
7
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment