-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (44 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
63 lines (44 loc) · 1.41 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
# -----------------------------------#
# Stage 1: Build Python dependencies #
# -----------------------------------#
FROM python:3.13-slim AS build
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3-dev \
libffi-dev \
libssl-dev \
curl \
ca-certificates \
zlib1g-dev \
libxml2-dev \
libxslt1-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip setuptools wheel
RUN python -m venv /venv
COPY src/ ./src/
COPY pyproject.toml ./
RUN /venv/bin/pip install --no-cache-dir .
# -----------------------------------#
# Stage 2: Build Runtime Image #
# -----------------------------------#
FROM python:3.13-slim
LABEL org.opencontainers.image.title="GH0STB1T"
LABEL org.opencontainers.image.description="A multi-format steganography toolkit"
LABEL org.opencontainers.image.source="https://github.com/kariemoorman/ghostbit"
LABEL org.opencontainers.image.licenses="Apache-2.0"
ENV HOME=/home/appuser
RUN useradd --create-home --shell /bin/bash appuser
WORKDIR /app
COPY --from=build /venv /venv
ENV PATH="/venv/bin:$PATH"
ENV PYTHONPATH=/app/ghostbit
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /data
RUN chown -R appuser:appuser /data
USER appuser
WORKDIR /data
ENTRYPOINT ["ghostbit"]
CMD ["--help"]