/
Dockerfile.template
25 lines (24 loc) · 1.07 KB
/
Dockerfile.template
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
#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" ]
RUN <<EOF
apt-get update
apt-get -y install --no-install-recommends \
zsh
EOF
ARG name
ARG version
RUN <<EOF
check-github-release-asset "earthly/earthly" "v${version}" "earthly-linux-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/earthly" \
"https://github.com/earthly/earthly/releases/download/v${version}/earthly-linux-${alt_arch}"
chmod +x "${prefix}${target}/bin/earthly"
"${prefix}${target}/bin/earthly" bootstrap --with-autocomplete --no-buildkit
cp /usr/share/bash-completion/completions/earthly "${prefix}${target}/share/bash-completion/completions/earthly"
sed -i "s|${prefix}||" "${prefix}${target}/share/bash-completion/completions/earthly"
cp /usr/local/share/zsh/site-functions/_earthly "${prefix}${target}/share/zsh/vendor-completions/_earthly"
sed -i "s|${prefix}||" "${prefix}${target}/share/zsh/vendor-completions/_earthly"
EOF