|
1 | | -FROM ubuntu:questing-20251217 |
2 | | - |
3 | | -# Disable interactive mode |
4 | | -ENV DEBIAN_FRONTEND=noninteractive |
| 1 | +FROM alpine:3.23.4 |
5 | 2 |
|
6 | 3 | # Copy all needed files |
7 | 4 | COPY entrypoint.sh / |
| 5 | +COPY alpine-packages.txt /tmp/alpine-packages.txt |
8 | 6 |
|
9 | 7 | # Install needed packages |
10 | | -SHELL ["/bin/bash", "-euxo", "pipefail", "-c"] |
11 | | -# hadolint ignore=DL3008 |
12 | | -RUN chmod +x /entrypoint.sh ;\ |
13 | | - apt-get update -y ;\ |
14 | | - apt-get install --no-install-recommends -y \ |
15 | | - gpg-agent \ |
16 | | - software-properties-common ;\ |
17 | | - echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections ;\ |
18 | | - add-apt-repository ppa:git-core/ppa ;\ |
19 | | - apt-get update -y ;\ |
20 | | - apt-get install --no-install-recommends -y \ |
21 | | - git ;\ |
22 | | - # Install git-lfs without post-install configuration to avoid dpkg errors \ |
23 | | - apt-get download git-lfs ;\ |
24 | | - dpkg --unpack git-lfs*.deb ;\ |
25 | | - rm -f /var/lib/dpkg/info/git-lfs.postinst ;\ |
26 | | - dpkg --configure git-lfs ;\ |
27 | | - apt-get install -f --no-install-recommends -y ;\ |
28 | | - rm git-lfs*.deb ;\ |
29 | | - apt-get clean ;\ |
30 | | - rm -rf /var/lib/apt/lists/* |
| 8 | +SHELL ["/bin/sh", "-euxo", "pipefail", "-c"] |
| 9 | +# hadolint ignore=DL3018 |
| 10 | +RUN set -eux; \ |
| 11 | + xargs -r apk add --no-cache < /tmp/alpine-packages.txt; \ |
| 12 | + chmod +x /entrypoint.sh; \ |
| 13 | + git --version; \ |
| 14 | + git-lfs version; \ |
| 15 | + rm -rf /var/cache/*; \ |
| 16 | + rm -rf /root/.cache/*; \ |
| 17 | + rm -rf /tmp/* |
31 | 18 |
|
32 | 19 | # Finish up |
33 | 20 | WORKDIR /github/workspace |
|
0 commit comments