-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 980 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (22 loc) · 980 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
28
29
30
# Start with a base Ubuntu image and install Python
FROM ubuntu:22.04
# Avoid prompts from apt
ARG DEBIAN_FRONTEND=noninteractive
# Install Python, git, and other dependencies, and apply updates
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y python3-pip python3-dev git && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Argument to specify the commit, defaults to the 'master' branch
ARG COMMIT_SHA=master
# Set the working directory in the container
WORKDIR /usr/src/app
# Upgrade the Ubuntu packaging toolchain before building the project.
RUN python3 -m pip install --upgrade pip "setuptools>=69" wheel && \
python3 -m pip install \
"git+https://github.com/SigProfilerSuite/SigProfilerMatrixGenerator.git@${COMMIT_SHA}"
# Create a non-root user
RUN useradd -m -s /bin/bash spm_user
# Change the ownership of the working directory
RUN chown -R spm_user:spm_user /usr/src/app
# Switch to the non-root user for security
USER spm_user