forked from jupyterhub/docker-image-cleaner
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (21 loc) · 878 Bytes
/
Dockerfile
File metadata and controls
25 lines (21 loc) · 878 Bytes
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
# NOTE: Updates to this image tag should go hand in hand with updates in the
# refreeze-dockerfile-requirements-txt.yaml workflow.
#
FROM python:3.11-alpine
# Ensures written logs are made available directly
ENV PYTHONUNBUFFERED=1
# Using tini to wrap our process, we react to SIGTERM quickly among other
# things. We use tini-static instead of tini as it embeds dependencies missing
# in alpine.
RUN ARCH=$(uname -m); \
if [ "$ARCH" = x86_64 ]; then ARCH=amd64; fi; \
if [ "$ARCH" = aarch64 ]; then ARCH=arm64; fi; \
wget -qO /tini "https://github.com/krallin/tini/releases/download/v0.19.0/tini-static-$ARCH" \
&& chmod +x /tini
# Install docker-image-cleaner
COPY . /opt/docker-image-cleaner
WORKDIR /opt/docker-image-cleaner
RUN pip install --no-cache-dir \
-r requirements.txt \
.
ENTRYPOINT [ "/tini", "--", "docker-image-cleaner" ]