Skip to content

Commit 6ec4d7c

Browse files
committed
Add Dockerfile
1 parent 8299d12 commit 6ec4d7c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Dockerfile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM debian:11-slim AS build
2+
LABEL maintainer="Björn Busse <[email protected]>"
3+
LABEL org.opencontainers.image.source https://github.com/opsboost/iss-display-controller
4+
LABEL org.label-schema.description="iss display controller"
5+
LABEL org.label-schema.name="iss-display-controller"
6+
LABEL org.label-schema.schema-version="1.0"
7+
LABEL org.label-schema.vcs-url="https://github.com/opsboost/iss-display-controller"
8+
9+
RUN apt-get update && \
10+
apt-get install --no-install-suggests --no-install-recommends --yes \
11+
git libxkbcommon-dev pkg-config python3-venv gcc libpython3-dev && \
12+
python3 -m venv /venv && \
13+
/venv/bin/pip install --upgrade pip setuptools wheel
14+
15+
# Build the virtualenv as a separate step: Only re-execute this step when requirements.txt changes
16+
FROM build AS build-venv
17+
COPY requirements.txt /requirements.txt
18+
RUN /venv/bin/pip install --disable-pip-version-check -r /requirements.txt
19+
20+
# Copy the virtualenv into a distroless image
21+
FROM gcr.io/distroless/python3-debian11
22+
COPY --from=build-venv /venv /venv
23+
COPY . /controller
24+
WORKDIR /controller
25+
ENTRYPOINT ["/venv/bin/python3", "controller"]

0 commit comments

Comments
 (0)