Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
TFS
controller
Commits
6b93b8f1
Commit
6b93b8f1
authored
3 years ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Updated WebUI Dockerfile
parent
5b24fcc1
No related branches found
No related tags found
1 merge request
!54
Release 2.0.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/webui/Dockerfile
+21
-9
21 additions, 9 deletions
src/webui/Dockerfile
with
21 additions
and
9 deletions
src/webui/Dockerfile
+
21
−
9
View file @
6b93b8f1
...
@@ -12,14 +12,14 @@
...
@@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
FROM
python:3-slim
FROM
python:3
.9
-slim
# Ref: https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
# Ref: https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
# Install dependencies
# Install dependencies
RUN
apt-get
--yes
--quiet
--quiet
update
&&
\
#
RUN apt-get --yes --quiet --quiet update && \
apt-get
--yes
--quiet
--quiet
install
wget g++
&&
\
#
apt-get --yes --quiet --quiet install wget g++ && \
rm
-rf
/var/lib/apt/lists/
*
#
rm -rf /var/lib/apt/lists/*
# Set Python to show logs as they occur
# Set Python to show logs as they occur
ENV
PYTHONUNBUFFERED=0
ENV
PYTHONUNBUFFERED=0
...
@@ -30,7 +30,7 @@ ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION='python'
...
@@ -30,7 +30,7 @@ ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION='python'
# wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
# wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
# chmod +x /bin/grpc_health_probe
# chmod +x /bin/grpc_health_probe
#
c
reating a user for security reasons
#
C
reating a user for security reasons
RUN
groupadd
-r
webui
&&
useradd
--no-log-init
-r
-m
-g
webui webui
RUN
groupadd
-r
webui
&&
useradd
--no-log-init
-r
-m
-g
webui webui
USER
webui
USER
webui
...
@@ -42,9 +42,21 @@ WORKDIR /home/webui/teraflow
...
@@ -42,9 +42,21 @@ WORKDIR /home/webui/teraflow
ENV
VIRTUAL_ENV=/home/webui/venv
ENV
VIRTUAL_ENV=/home/webui/venv
RUN
python3
-m
venv
${
VIRTUAL_ENV
}
RUN
python3
-m
venv
${
VIRTUAL_ENV
}
ENV
PATH="${VIRTUAL_ENV}/bin:${PATH}"
ENV
PATH="${VIRTUAL_ENV}/bin:${PATH}"
COPY
--chown=webui:webui webui/requirements.in /home/webui/teraflow/webui/requirements.in
RUN
pip
install
--upgrade
pip setuptools wheel pip-tools
&&
pip-compile
--output-file
=
webui/requirements.txt webui/requirements.in
# Get generic Python packages
RUN
pip
install
-r
webui/requirements.txt
RUN
python3
-m
pip
install
--upgrade
pip
RUN
python3
-m
pip
install
--upgrade
setuptools wheel
RUN
python3
-m
pip
install
--upgrade
pip-tools
# Get common Python packages
# Note: this step enables sharing the previous Docker build steps among all the Python components
COPY
--chown=webui:webui common_requirements.in common_requirements.in
RUN
pip-compile
--quiet
--output-file
=
common_requirements.txt common_requirements.in
RUN
python3
-m
pip
install
-r
common_requirements.txt
COPY
--chown=webui:webui src/webui/requirements.in requirements.in
RUN
pip-compile
--output-file
=
requirements.txt requirements.in
RUN
pip
install
-r
requirements.txt
# Add files into working directory
# Add files into working directory
COPY
--chown=webui:webui common/. common
COPY
--chown=webui:webui common/. common
...
@@ -59,5 +71,5 @@ COPY --chown=webui:webui service/proto/. service/proto
...
@@ -59,5 +71,5 @@ COPY --chown=webui:webui service/proto/. service/proto
COPY
--chown=webui:webui service/client/. service/client
COPY
--chown=webui:webui service/client/. service/client
COPY
--chown=webui:webui webui/. webui
COPY
--chown=webui:webui webui/. webui
# Start
webui
service
# Start
the
service
ENTRYPOINT
["python", "-m", "webui.service"]
ENTRYPOINT
["python", "-m", "webui.service"]
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