-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
46 lines (33 loc) · 1.22 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# SPDX-FileCopyrightText: 2022 Renaissance Computing Institute. All rights reserved.
# SPDX-FileCopyrightText: 2023 Renaissance Computing Institute. All rights reserved.
# SPDX-FileCopyrightText: 2024 Renaissance Computing Institute. All rights reserved.
#
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-License-Identifier: LicenseRef-RENCI
# SPDX-License-Identifier: MIT
# This Dockerfile is used to build THE APSVIZ-Settings python image
FROM python:3.12.7-slim
# update the image base
RUN apt-get update && apt-get -y upgrade
# update pip
RUN pip install --upgrade pip
# clear the apt cache
RUN apt-get clean
# get some credit
LABEL maintainer="[email protected]"
# get the build argument that has the version
ARG APP_VERSION=$(APP_VERSION)
# now add the version arg value into a ENV param
ENV APP_VERSION=$APP_VERSION
# Copy in just the requirements first for caching purposes
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
# create a new non-root user and switch to it
RUN useradd --create-home -u 1000 nru
USER nru
# Create the directory for the code and cd to it
WORKDIR /repo/APSVIZ-Settings
# Copy in the rest of the code
COPY . .
# start the service entry point
ENTRYPOINT ["python", "main.py"]