forked from mawkee/requestshogger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (21 loc) · 812 Bytes
/
Dockerfile
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
# requestshogger.Dockerfile
FROM debian:11-slim AS build
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends --yes python3-venv && \
python3 -m venv /venv && \
/venv/bin/pip3 install --upgrade pip
# Build the virtualenv as a separate step
# It will only re-execute this step when requirements.txt changes
FROM build AS build-venv
COPY requirements.txt /requirements.txt
RUN /venv/bin/pip3 install --disable-pip-version-check -U -r /requirements.txt
# Copy the virtualenv into a distroless image
FROM gcr.io/distroless/python3-debian11
COPY --from=build-venv /venv /venv
COPY hogger /app/hogger
WORKDIR /app
# Don't bind to a specific address
ENV HOGGER_HOST="0.0.0.0"
# Executing Hogger
ENTRYPOINT ["/venv/bin/python", "/app/hogger/reqhogger.py"]
EXPOSE 8910