-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (30 loc) · 1.12 KB
/
Dockerfile
File metadata and controls
41 lines (30 loc) · 1.12 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
ARG APP_IMAGE=python:3.11-slim
FROM $APP_IMAGE AS builder
ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
PATH="/root/.local/bin:$PATH"
RUN apt-get update && apt-get -y install python3-pip && pip install pipx
FROM $APP_IMAGE
ARG UID=1000
ARG GID=1000
ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
PATH="/root/.local/bin:$PATH"
# create basicuser for container and use the GID/UID from the host build user (if provided)
RUN groupadd -g $GID basicuser && useradd -r -u $UID -g basicuser basicuser
RUN mkdir -p /home/basicuser && chown basicuser:basicuser -R /home/basicuser
USER basicuser
ENV PATH="/home/basicuser/.local/bin:${PATH}"
# Copy dependencies from builder stage
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
RUN pipx install BlueSkySight
ENTRYPOINT ["BlueSkySight-Firehose"]