-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
71 lines (53 loc) · 2.15 KB
/
Copy pathDockerfile
File metadata and controls
71 lines (53 loc) · 2.15 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
ARG PYTHON_VERSION=3.12
ARG STEGX_VERSION=2.0.0
ARG GIT_SHA=unknown
ARG BUILD_DATE=unknown
FROM python:${PYTHON_VERSION}-slim AS builder
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY pyproject.toml README.md requirements.txt LICENSE ./
COPY src ./src
ENV PREFIX=/install
RUN pip install --prefix="${PREFIX}" --no-warn-script-location ".[all]"
FROM python:${PYTHON_VERSION}-slim AS runtime
ARG STEGX_VERSION
ARG GIT_SHA
ARG BUILD_DATE
LABEL org.opencontainers.image.title="StegX" \
org.opencontainers.image.description="Authenticated LSB steganography with Argon2id, AES-GCM/ChaCha20-Poly1305, v3 container format, Shamir quorum and plausible-deniability panic mode" \
org.opencontainers.image.version="${STEGX_VERSION}" \
org.opencontainers.image.revision="${GIT_SHA}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.authors="Delta-Sec <ayhamasfoor1@gmail.com>" \
org.opencontainers.image.url="https://github.com/Delta-Sec/StegX" \
org.opencontainers.image.source="https://github.com/Delta-Sec/StegX" \
org.opencontainers.image.documentation="https://delta-sec.github.io/StegX/" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.vendor="Delta-Sec"
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
STEGX_IN_DOCKER=1
RUN apt-get update \
&& apt-get install --no-install-recommends -y tini \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /install /usr/local
RUN groupadd --system --gid 10001 stegx \
&& useradd --system --uid 10001 --gid 10001 \
--home-dir /home/stegx --create-home --shell /usr/sbin/nologin stegx \
&& mkdir /work \
&& chown stegx:stegx /work
USER stegx
WORKDIR /work
HEALTHCHECK --interval=1m --timeout=10s --start-period=10s --retries=3 \
CMD ["stegx", "--version"]
ENTRYPOINT ["/usr/bin/tini", "--", "stegx"]
CMD ["--help"]