-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.template
33 lines (30 loc) · 1.37 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
26
27
28
29
30
31
32
33
#syntax=docker/dockerfile:1.6.0
FROM ghcr.io/uniget-org/tools/rust:latest AS rust
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 --from=rust / /usr/local/
ARG DEBIAN_FRONTEND=noninteractive
RUN <<EOF
apt-get update
apt-get -y install --no-install-recommends \
build-essential
EOF
WORKDIR /tmp/github.com/bensadeh/tailspin
RUN <<EOF
source "/etc/profile.d/cargo.sh"
git clone -q --config advice.detachedHead=false --depth 1 --branch "${version}" https://github.com/bensadeh/tailspin .
export RUSTFLAGS='-C target-feature=+crt-static'
cargo build --release --target "${arch}-unknown-linux-gnu"
cp "target/${arch}-unknown-linux-gnu/release/tspin" "${prefix}/bin/"
curl --silent --show-error --location --fail --output "${prefix}/share/bash-completion/completions/tspin" \
--url "https://github.com/bensadeh/tailspin/raw/2.1.0/completions/tspin.bash"
curl --silent --show-error --location --fail --output "${prefix}/share/fish/vendor_completions.d/tspin.fish" \
--url "https://github.com/bensadeh/tailspin/raw/2.1.0/completions/tspin.fish"
curl --silent --show-error --location --fail --output "${prefix}/share/zsh/vendor-completions/_tspin" \
--url "https://github.com/bensadeh/tailspin/raw/2.1.0/completions/tspin.zsh"
EOF