-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
67 lines (61 loc) · 2.35 KB
/
Dockerfile
File metadata and controls
67 lines (61 loc) · 2.35 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
FROM alpine:3.23.3
# Install prerequisits
SHELL ["/bin/sh", "-euxo", "pipefail", "-c"]
RUN apk update --no-cache ;\
apk add --no-cache \
bash~=5.3 \
docker=~=29.1 \
make~=4.4 \
ncurses~=6.5 \
python3~=3.12 \
py3-pip~=25.1
# List of Python packages
COPY pip/requirements.txt /tmp/requirements.txt
# Python packages
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
RUN pip3 install --break-system-packages --no-cache-dir -r /tmp/requirements.txt
COPY show-versions.sh /usr/bin/
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
RUN chmod +x \
/usr/bin/show-versions.sh ;\
# Cleanup \
rm -rf /var/cache/* ;\
rm -rf /root/.cache/* ;\
rm -rf /tmp/*
# Labels for http://label-schema.org/rc1/#build-time-labels
# And for https://github.com/opencontainers/image-spec/blob/master/annotations.md
# And for https://help.github.com/en/actions/building-actions/metadata-syntax-for-github-actions
ARG NAME="Simplified CI/CD runner"
ARG DESCRIPTION="Simplified environment with Make and Docker to be used as CI/CD runner for more complicated images."
ARG REPO_URL="https://github.com/devops-infra/docker-simple-runner"
ARG AUTHOR="Krzysztof Szyper <biotyk@mail.com>"
ARG HOMEPAGE="https://christophshyper.github.io/"
ARG BUILD_DATE=2020-04-01T00:00:00Z
ARG VCS_REF=abcdef1
ARG VERSION=0.0.0
LABEL \
org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.name="${NAME}" \
org.label-schema.description="${DESCRIPTION}" \
org.label-schema.usage="README.md" \
org.label-schema.url="${HOMEPAGE}" \
org.label-schema.vcs-url="${REPO_URL}" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vendor="${AUTHOR}" \
org.label-schema.version="${VERSION}" \
org.label-schema.schema-version="1.0" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.authors="${AUTHOR}" \
org.opencontainers.image.url="${HOMEPAGE}" \
org.opencontainers.image.documentation="${REPO_URL}/blob/master/README.md" \
org.opencontainers.image.source="${REPO_URL}" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${VCS_REF}" \
org.opencontainers.image.vendor="${AUTHOR}" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.title="${NAME}" \
org.opencontainers.image.description="${DESCRIPTION}" \
maintainer="${AUTHOR}" \
repository="${REPO_URL}"
WORKDIR /data
CMD ["show-versions.sh"]