-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.template
20 lines (18 loc) · 1.02 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#syntax=docker/dockerfile:1.6.0
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
COPY init-buildkit "${prefix}${target}/etc/init.d/buildkit"
RUN <<EOF
check-github-release-asset "moby/buildkit" "v${version}" "buildkit-v${version}.linux-${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/moby/buildkit/releases/download/v${version}/buildkit-v${version}.linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --strip-components=1 --no-same-owner
curl --silent --location --fail --output "${prefix}${target}/etc/systemd/system/buildkit.service" \
"https://github.com/moby/buildkit/raw/v${version}/examples/systemd/system/buildkit.service"
curl --silent --location --fail --output "${prefix}${target}/etc/systemd/system/buildkit.socket" \
"https://github.com/moby/buildkit/raw/v${version}/examples/systemd/system/buildkit.socket"
EOF