-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.j2
More file actions
27 lines (21 loc) · 973 Bytes
/
Dockerfile.j2
File metadata and controls
27 lines (21 loc) · 973 Bytes
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
# Base image for the NSO container - From the config.yaml file
FROM {{ nso-base }}
# Setup of a working directory
WORKDIR /nso/run/packages
# Copying of the resources for initial setup
COPY config.yaml /tmp/config.yaml
COPY requirements.txt /tmp/requirements.txt
COPY setup/download-artifacts.sh /tmp/download-artifacts.sh
# Ensure we are running as root for operations that require elevated privileges
USER root
# pip install of the libraries in the requirements.txt fi;e
RUN pip install -r /tmp/requirements.txt
# Downloading of the artifacts mentioned in the yaml file with the credentials provided
# Mount the secret into this specific RUN command's context.
# The secret will then be available at /run/secrets/artifact_server_token
RUN chmod +x /tmp/download-artifacts.sh
RUN --mount=type=secret,id=artifact_server_token sh -x /tmp/download-artifacts.sh
# Cleanup
RUN rm -rf /tmp/download-artifacts.sh
RUN rm -rf /tmp/config.yaml
RUN rm -rf /tmp/requirements.txt