Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata UI
Commits
2338eb68
Commit
2338eb68
authored
Jun 24, 2019
by
Christophe Benz
Browse files
Docker: run service under non-root user...
due to chromium --headless limitation
parent
e5d0abd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
2338eb68
...
...
@@ -8,6 +8,14 @@ RUN pip install --no-cache-dir gunicorn==19.9.0
RUN
apt-get update
&&
\
apt-get
install
--yes
chromium
=
73.0.3683.75-1~deb9u1
ARG
user=jenkins
ARG
group=jenkins
ARG
uid=1000
ARG
gid=1000
RUN
groupadd
-g
${
gid
}
${
group
}
&&
\
useradd
-u
${
uid
}
-g
${
gid
}
--no-create-home
--shell
/bin/bash
${
user
}
WORKDIR
/app
COPY
requirements.txt .
...
...
@@ -16,4 +24,7 @@ RUN pip install --no-cache-dir --requirement requirements.txt
COPY
. .
RUN
pip
install
--no-cache-dir
--editable
.
# Cf https://bugs.chromium.org/p/chromium/issues/detail?id=638180
USER
${user}
CMD
gunicorn --bind 0.0.0.0:5000 validata_ui:app
\ No newline at end of file
Write
Preview
Supports
Markdown
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