Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
d483ea74
Commit
d483ea74
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
apply some more common practices for Dockerfiles
parent
dbf7063f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!90
include TRANSLATIONS_DIR as environment variable in the Docker image
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+10
-6
10 additions, 6 deletions
Dockerfile
with
10 additions
and
6 deletions
Dockerfile
+
10
−
6
View file @
d483ea74
FROM
python:3.11-alpine
WORKDIR
/app
ARG
ARTIFACT_VERSION
RUN
apk add gcc libc-dev libffi-dev
RUN
apk add
--no-cache
gcc libc-dev libffi-dev
&&
\
addgroup
-S
appgroup
&&
adduser
-S
appuser
-G
appgroup
-h
/app
USER
appuser
RUN
pip
install
\
--pre
\
--extra-index-url
https://artifactory.software.geant.org/artifactory/api/pypi/geant-swd-pypi/simple
\
--target
/app
\
geant-service-orchestrator
==
${
ARTIFACT_VERSION
}
WORKDIR
/app
# Create the directory for the configuration and copy the example config into it
# NOTE: a real config must be mounted at /etc/gso/config.json when running the container
RUN
mkdir
-p
/etc/gso
COPY
gso/oss-params-example.json /etc/gso/config.json
RUN
mkdir
-p
/etc/gso
&&
\
chown
-R
appuser:appgroup /etc/gso
COPY
--chown=appuser:appgroup gso/oss-params-example.json /etc/gso/config.json
# Expose port 8080 for the FastAPI application
EXPOSE
8080
...
...
@@ -27,7 +30,8 @@ ENV TRANSLATIONS_DIR=/app/gso/translations/
# Run database migrations
RUN
mv
gso/migrations gso/migrations_temp
RUN
PYTHONPATH
=
.
python gso/main.py db init
RUN
rm
-rf
gso/migrations
&&
mv
gso/migrations_temp gso/migrations
RUN
rm
-rf
gso/migrations
&&
\
mv
gso/migrations_temp gso/migrations
RUN
PYTHONPATH
=
.
python gso/main.py db upgrade heads
# Start the FastAPI application
...
...
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