-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (40 loc) · 1.24 KB
/
Dockerfile
File metadata and controls
51 lines (40 loc) · 1.24 KB
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
47
48
49
# FROM python:3.12-slim
# USER root
# RUN apt-get update && apt-get install -y --no-install-recommends \
# build-essential \
# screen \
# && apt-get clean && rm -rf /var/lib/apt/lists/*
# RUN groupadd -r radpsuser && useradd -r -g radpsuser radpsuser
# RUN mkdir -p /home/radpsuser
# RUN chown -R radpsuser:radpsuser /home/radpsuser
# USER radpsuser
# RUN mkdir -p /home/radpsuser/.casa/data
# COPY requirements.txt /tmp/requirements.txt
# RUN pip install --no-cache-dir -r /tmp/requirements.txt
FROM python:3.12-slim
# System packages
USER root
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
screen \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Create user with existing GID 100 (do NOT recreate the group)
RUN useradd \
-u 1000 \
-g 100 \
-m \
-d /home/jovyan \
-s /bin/bash \
jovyan
# CASA requires this directory
RUN mkdir -p /home/jovyan/.casa/data \
&& chown -R 1000:100 /home/jovyan
# Environment
ENV HOME=/home/jovyan
ENV PATH="/home/jovyan/.local/bin:${PATH}"
# Python requirements
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
# Drop privileges
USER 1000:100
WORKDIR /home/jovyan