-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (29 loc) · 946 Bytes
/
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
# BSD 3-Clause All rights reserved.
#
# SPDX-License-Identifier: BSD 3-Clause
# This Dockerfile is used to build the iRODS-K8s-Staging image
FROM python:3.12.6-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="powen@renci.org"
# 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
# create a new non-root user and switch to it
RUN useradd --create-home -u 999 nru
USER nru
# Create the directory for the code and cd to it
WORKDIR /repo/iRODS-K8s-Staging
# Copy in just the requirements first for caching purposes
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Copy in the rest of the code
COPY . .
# start the service entry point
ENTRYPOINT ["python", "main.py"]