-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy pathContainerfile
More file actions
69 lines (67 loc) · 1.94 KB
/
Containerfile
File metadata and controls
69 lines (67 loc) · 1.94 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
68
69
# container used for building and testing our own repository code
FROM ghcr.io/jdx/mise:latest
LABEL org.opencontainers.image.source=https://github.com/ansible/vscode-ansible
LABEL org.opencontainers.image.authors="Ansible"
LABEL org.opencontainers.image.vendor="Red Hat"
LABEL org.opencontainers.image.licenses="GPL-3.0"
LABEL org.opencontainers.image.description="Internal builder for vscode-ansible repository."
ENV CI=true
ENV DEBIAN_FRONTEND=noninteractive
ENV SKIP_PODMAN=1
ENV SKIP_DOCKER=1
ENV MISE_TRUSTED_CONFIG_PATHS=/
ENV PATH=/root/.local/bin:${PATH}
USER 0
WORKDIR /context
# install ansible-dev-tools specific packages and dependencies while avoiding
# adding multiple layers to the image.
# cspell:disable
# https://docs.docker.com/reference/build-checks/secrets-used-in-arg-or-env/
RUN \
--mount=type=secret,id=github_token,env=GITHUB_TOKEN \
--mount=type=bind,target=. \
--mount=type=cache,target=/root/.local/share/mise,sharing=locked \
--mount=type=cache,target=/root/.cache/mise,sharing=locked \
--mount=type=cache,target=/var/cache/apt/archives/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists/,sharing=locked \
DEBIAN_FRONTEND=noninteractive apt-get -qq -o=Dpkg::Use-Pty=0 update 2> /dev/null && \
apt-get -qq -o=Dpkg::Use-Pty=0 install --no-install-recommends \
curl \
file \
git \
golang-github-go-enry-go-oniguruma-dev \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libatspi2.0-0 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libgdk-pixbuf-2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libxcb1 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxkbcommon0 \
libxrandr2 \
libxshmfence1 \
lsof \
sudo \
xauth \
xvfb \
2> /dev/null && \
git config --global --add safe.directory '*' && \
mkdir -p /root/.local/bin && \
mise install && \
mise list && \
mise exec -- uv sync --no-progress -q --active && \
mise exec -- python --version && \
mise exec -- prek --version && \
mise exec -- prek install-hooks