Skip to content

Commit

Permalink
Fixed builds #2213
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Jan 2, 2024
1 parent 7c44d4f commit 357a1d0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 36 deletions.
3 changes: 2 additions & 1 deletion tools/tailspin/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ apt-get -y install --no-install-recommends \
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 CARGO_HOME=/usr/local/cargo
export RUSTUP_HOME=/usr/local/rustup
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/"
Expand Down
19 changes: 7 additions & 12 deletions tools/tasker/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#syntax=docker/dockerfile:1.6.0

FROM ubuntu:22.04@sha256:6042500cf4b44023ea1894effe7890666b0c5c7871ed83a97c36c76ae560bb9b AS build
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 \
Expand All @@ -17,16 +21,7 @@ ARG version
RUN <<EOF
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/stevegrubb/tasker .
./autogen.sh
./configure --prefix=/opt/tasker --disable-shared --enable-static
./configure --prefix="${prefix}" --disable-shared --enable-static
make LDFLAGS=--static
make install
EOF

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=build /opt/tasker/ ${prefix}/
EOF
36 changes: 13 additions & 23 deletions tools/tig/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#syntax=docker/dockerfile:1.6.0

FROM ubuntu:22.04 AS build
WORKDIR /tmp/tig
ARG name
ARG version
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 \
Expand All @@ -13,26 +14,15 @@ apt-get -y install --no-install-recommends \
ncurses-dev \
make
EOF
WORKDIR /tmp/tig
ARG name
ARG version
RUN <<EOF
curl --silent --location --fail "https://github.com/jonas/tig/releases/download/tig-${version}/tig-${version}.tar.gz" \
| tar --extract --gzip --strip-components=1
./configure
make prefix=/usr/local
make install install-doc-man prefix=/usr/local
mkdir -p \
/usr/local/share/bash-completion/completions \
/usr/local/share/zsh/vendor-completions
cp contrib/tig-completion.bash "/usr/local/share/bash-completion/completions/tig"
cp contrib/tig-completion.zsh "/usr/local/share/zsh/vendor-completions/_tig"
rm /usr/local/man
rm /usr/local/sbin/unminimize
EOF

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=build /usr/local/ ${prefix}/
make prefix="${prefix}"
make install install-doc-man prefix="${prefix}"
cp contrib/tig-completion.bash "${prefix}/share/bash-completion/completions/tig"
cp contrib/tig-completion.zsh "${prefix}/share/zsh/vendor-completions/_tig"
EOF

0 comments on commit 357a1d0

Please sign in to comment.