-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (37 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
43 lines (37 loc) · 1.18 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
##
## Debian base layer with python
##
# hadolint global ignore=DL3008
FROM docker.io/library/debian:13.4-slim@sha256:26f98ccd92fd0a44d6928ce8ff8f4921b4d2f535bfa07555ee5d18f61429cf0c AS debian
RUN --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,target=/var/cache \
--mount=type=tmpfs,target=/var/lib/dpkg \
--mount=type=tmpfs,target=/var/log \
apt-get -qq update && \
apt-get -qq install --yes --no-install-recommends python3-minimal libpython3-stdlib
##
## Download yamllint
##
FROM debian AS build
RUN --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
--mount=type=cache,target=/var/cache \
--mount=type=tmpfs,target=/var/lib/dpkg \
--mount=type=tmpfs,target=/var/log \
apt-get -qq update && \
apt-get -qq install --yes --no-install-recommends python3-pip
ARG PIP_INDEX_URL
ARG PIP_TRUSTED_HOST
RUN pip install yamllint==v1.38.0 \
--root=/build \
--root-user-action=ignore \
--break-system-packages \
--no-warn-script-location \
--no-cache-dir
##
## Final stage
##
FROM debian
COPY --link --from=build /build /
COPY --link --chmod=555 entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
USER 1000:1000