Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DataCatalog
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
eFlows4HPC WP2
DataCatalog
Commits
95044ff4
Commit
95044ff4
authored
3 years ago
by
Christian Boettcher
Browse files
Options
Downloads
Plain Diff
Merge branch 'noroot' into 'master'
no root in dockerfile See merge request rybicki1/datacatalog!7
parents
35bd9b54
4099ad51
No related branches found
No related tags found
1 merge request
!7
no root in dockerfile
Pipeline
#91595
passed
3 years ago
Stage: test
Stage: build
Stage: deploy
Stage: test-deployment
Stage: cleanup
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
apiserver/Dockerfile
+12
-8
12 additions, 8 deletions
apiserver/Dockerfile
with
12 additions
and
8 deletions
apiserver/Dockerfile
+
12
−
8
View file @
95044ff4
FROM
python:3.9-slim
LABEL
maintainer="Christian Böttcher <c.boettcher@fz-juelich.de>"
RUN
useradd
--create-home
appuser
WORKDIR
/home/appuser
USER
appuser
EXPOSE
8000
RUN
mkdir
-p
/app
/mnt/data
VOLUME
/app
/mnt/
ADD
./apiserver/ /app/apiserver
ADD
./requirements.txt /app/apiserver
/requirements.txt
RUN
python3
-m
pip
install
--no-cache-dir
-r
/app/apiserver/requirements.txt
RUN
mkdir
-p
.
/mnt/data
VOLUME
.
/mnt/
COPY
./requirements.txt ./requirements.txt
RUN
python3
-m
pip
install
--upgrade
pip
&&
python3
-m
pip
install
--user
--no-cache-dir
-r
.
/requirements.txt
ENV
PATH="/home/appuser/.local/bin/:${PATH}"
# set data directory properly for the docker container
RUN
sed
-i
's_./app/data_/app/mnt/data_g'
/app/apiserver/config.env
&&
sed
-i
's_./
app
/
user
db.json_/app/mnt/userdb.json_g'
/app/apiserver/config.env
&&
sed
-i
's_./app/apiserver.log_/app/mnt/apiserver.log_g'
/app/apiserver/log_conf.yaml
WORKDIR
/app
COPY
--chown=
appuser
./apiserver/ ./apiserver
RUN
sed
-i
's_./app/data_./mnt/data_g'
./apiserver/config.env
&&
sed
-i
's_./app/userdb.json_./mnt/userdb.json_g'
./apiserver/config.env
&&
sed
-i
's_./app/apiserver.log_./mnt/apiserver.log_g'
./apiserver/log_conf.yaml
ENTRYPOINT
["uvicorn", "--host", "0.0.0.0", "--log-level", "debug", "--log-config=./apiserver/log_conf.yaml", "apiserver:app"]
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