Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove target w #2284

Merged
merged 3 commits into from Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 9 additions & 7 deletions tools/wagi/Dockerfile.template
@@ -1,8 +1,10 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
Expand All @@ -20,13 +22,13 @@ case "${alt_arch}" in
esac
check-github-release-asset "deislabs/wagi" "v${version}" "wagi-v${version}-linux-${arch_suffix}.tar.gz"
curl --silent --location --fail "https://github.com/deislabs/wagi/releases/download/v${version}/wagi-v${version}-linux-${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
wagi
EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/foo" completion bash >"${prefix}${target}/share/bash-completion/completions/foo"
#"${prefix}${target}/bin/foo" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}${target}/bin/foo" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_foo"
#"${prefix}/bin/foo" completion bash >"${prefix}/share/bash-completion/completions/foo"
#"${prefix}/bin/foo" completion fish >"${prefix}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}/bin/foo" completion zsh >"${prefix}/share/zsh/vendor-completions/_foo"
#EOF
16 changes: 9 additions & 7 deletions tools/wait-for/Dockerfile.template
@@ -1,20 +1,22 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
check-github-release-asset "dnnrly/wait-for" "v${version}" "wait-for_${version}_linux_${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/dnnrly/wait-for/releases/download/v${version}/wait-for_${version}_linux_${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
wait-for
EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/foo" completion bash >"${prefix}${target}/share/bash-completion/completions/foo"
#"${prefix}${target}/bin/foo" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}${target}/bin/foo" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_foo"
#"${prefix}/bin/foo" completion bash >"${prefix}/share/bash-completion/completions/foo"
#"${prefix}/bin/foo" completion fish >"${prefix}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}/bin/foo" completion zsh >"${prefix}/share/zsh/vendor-completions/_foo"
#EOF
12 changes: 7 additions & 5 deletions tools/walk/Dockerfile.template
@@ -1,13 +1,15 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
check-github-release-asset "antonmedv/walk" "v${version}" "walk_linux_${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/walk" \
curl --silent --location --fail --output "${prefix}/bin/walk" \
"https://github.com/antonmedv/walk/releases/download/v${version}/walk_linux_${alt_arch}"
chmod +x "${prefix}${target}/bin/walk"
chmod +x "${prefix}/bin/walk"
EOF
15 changes: 8 additions & 7 deletions tools/warp/Dockerfile.template
@@ -1,8 +1,10 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS download
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
RUN <<EOF
Expand All @@ -25,11 +27,10 @@ check-github-release-asset "minio/warp" "v${version}" "warp_Linux_${arch_suffix}

echo "### Downloading warp ${version}"
curl --silent --location --fail "https://github.com/minio/warp/releases/download/v${version}/warp_Linux_${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
warp
EOF

FROM download AS prepare
COPY <<EOF ${prefix}${target}/share/bash-completion/completions/warp
cat <<"EOT" >"${prefix}/share/bash-completion/completions/warp"
complete -C warp warp
EOT
EOF
10 changes: 6 additions & 4 deletions tools/wasmedge/Dockerfile.template
@@ -1,12 +1,14 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
check-github-release-asset "WasmEdge/WasmEdge" "${version}" "WasmEdge-${version}-manylinux2014_${arch}.tar.xz"
curl --silent --location --fail "https://github.com/WasmEdge/WasmEdge/releases/download/${version}/WasmEdge-${version}-manylinux2014_${arch}.tar.xz" \
| tar --extract --xz --directory="${prefix}${target}" --strip-components=1 --no-same-owner
| tar --extract --xz --directory="${prefix}" --strip-components=1 --no-same-owner
EOF
10 changes: 6 additions & 4 deletions tools/wasmer/Dockerfile.template
@@ -1,8 +1,10 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
Expand All @@ -20,6 +22,6 @@ case "${alt_arch}" in
esac
check-github-release-asset "wasmerio/wasmer" "v${version}" "wasmer-linux-${arch_suffix}.tar.gz"
curl --silent --location --fail "https://github.com/wasmerio/wasmer/releases/download/v${version}/wasmer-linux-${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}" --no-same-owner \
| tar --extract --gzip --directory="${prefix}" --no-same-owner \
bin
EOF
17 changes: 10 additions & 7 deletions tools/wasmi/Dockerfile.template
@@ -1,11 +1,13 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main
FROM ghcr.io/uniget-org/tools/rust:latest AS rust

FROM ghcr.io/uniget-org/tools/rust:${ref} AS rust

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
COPY --from=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" ]
COPY --from=rust / /usr/local
ARG DEBIAN_FRONTEND=noninteractive
RUN <<EOF
apt-get update
Expand All @@ -16,9 +18,10 @@ WORKDIR /tmp/github.com/paritytech/wasmi
ARG name
ARG version
RUN <<EOF
source "${target}/etc/profile.d/cargo.sh"
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/paritytech/wasmi .
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/wasmi_cli" "${prefix}${target}/bin/"
cp "target/${arch}-unknown-linux-gnu/release/wasmi_cli" "${prefix}/bin/"
EOF
10 changes: 6 additions & 4 deletions tools/wasmtime/Dockerfile.template
@@ -1,13 +1,15 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
check-github-release-asset "bytecodealliance/wasmtime" "v${version}" "wasmtime-v${version}-${arch}-linux.tar.xz"
curl --silent --location --fail "https://github.com/bytecodealliance/wasmtime/releases/download/v${version}/wasmtime-v${version}-${arch}-linux.tar.xz" \
| tar --extract --xz --directory="${prefix}${target}/bin/" --strip-components=1 --no-same-owner \
| tar --extract --xz --directory="${prefix}/bin/" --strip-components=1 --no-same-owner \
"wasmtime-v${version}-${arch}-linux/wasmtime"
EOF
18 changes: 10 additions & 8 deletions tools/watchexec/Dockerfile.template
@@ -1,23 +1,25 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
check-github-release-asset "watchexec/watchexec" "v${version}" "watchexec-${version}-${arch}-unknown-linux-musl.tar.xz"
curl --silent --location --fail "https://github.com/watchexec/watchexec/releases/download/v${version}/watchexec-${version}-${arch}-unknown-linux-musl.tar.xz" \
| tar --extract --xz --directory="${prefix}${target}/bin/" --strip-components=1 --no-same-owner \
| tar --extract --xz --directory="${prefix}/bin/" --strip-components=1 --no-same-owner \
"watchexec-${version}-${arch}-unknown-linux-musl/watchexec" \
"watchexec-${version}-${arch}-unknown-linux-musl/watchexec.1"

mv "${prefix}${target}/bin/watchexec.1" "${prefix}${target}/share/man/man1/"
mv "${prefix}/bin/watchexec.1" "${prefix}/share/man/man1/"
EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/foo" completion bash >"${prefix}${target}/share/bash-completion/completions/foo"
#"${prefix}${target}/bin/foo" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}${target}/bin/foo" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_foo"
#"${prefix}/bin/foo" completion bash >"${prefix}/share/bash-completion/completions/foo"
#"${prefix}/bin/foo" completion fish >"${prefix}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}/bin/foo" completion zsh >"${prefix}/share/zsh/vendor-completions/_foo"
#EOF
15 changes: 9 additions & 6 deletions tools/watchtower/Dockerfile.template
@@ -1,18 +1,21 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main
FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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

RUN <<EOF
check-github-release-asset "containrrr/watchtower" "v${version}" "watchtower_linux_amd64.tar.gz"
curl --silent --location --fail "https://github.com/containrrr/watchtower/releases/download/v${version}/watchtower_linux_amd64.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner \
watchtower

"${prefix}${target}/bin/watchtower" completion bash >"${prefix}${target}/share/bash-completion/completions/watchtower"
"${prefix}${target}/bin/watchtower" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/watchtower.fish"
"${prefix}${target}/bin/watchtower" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_watchtower"
"${prefix}/bin/watchtower" completion bash >"${prefix}/share/bash-completion/completions/watchtower"
"${prefix}/bin/watchtower" completion fish >"${prefix}/share/fish/vendor_completions.d/watchtower.fish"
"${prefix}/bin/watchtower" completion zsh >"${prefix}/share/zsh/vendor-completions/_watchtower"
EOF
10 changes: 6 additions & 4 deletions tools/webhookd/Dockerfile.template
@@ -1,13 +1,15 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
check-github-release-asset "ncarlier/webhookd" "v${version}" "webhookd-linux-${alt_arch}.tgz"
curl --silent --location --fail "https://github.com/ncarlier/webhookd/releases/download/v${version}/webhookd-linux-${alt_arch}.tgz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner \
webhookd
EOF
12 changes: 7 additions & 5 deletions tools/websocat/Dockerfile.template
@@ -1,13 +1,15 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
check-github-release-asset "vi/websocat" "v${version}" "websocat.x86_64-unknown-linux-musl"
curl --silent --location --fail --output "${prefix}${target}/bin/websocat" \
curl --silent --location --fail --output "${prefix}/bin/websocat" \
"https://github.com/vi/websocat/releases/download/v${version}/websocat.x86_64-unknown-linux-musl"
chmod +x "${prefix}${target}/bin/websocat"
chmod +x "${prefix}/bin/websocat"
EOF
10 changes: 6 additions & 4 deletions tools/wg/Dockerfile.template
@@ -1,8 +1,10 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
Expand All @@ -19,5 +21,5 @@ check-clone https://git.zx2c4.com/wireguard-tools "v${version}"
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://git.zx2c4.com/wireguard-tools .
cd src
make LDFLAGS=-static
make install DESTDIR="${prefix}" PREFIX="${target}"
make install DESTDIR="${prefix}" PREFIX=""
EOF
18 changes: 10 additions & 8 deletions tools/whalebrew/Dockerfile.template
@@ -1,17 +1,19 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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
RUN <<EOF
check-github-release-asset "whalebrew/whalebrew" "${version}" "whalebrew-Linux-x86_64"
curl --silent --location --fail --output "${prefix}${target}/bin/whalebrew" \
curl --silent --location --fail --output "${prefix}/bin/whalebrew" \
"https://github.com/whalebrew/whalebrew/releases/download/${version}/whalebrew-Linux-x86_64"
chmod +x "${prefix}${target}/bin/whalebrew"
chmod +x "${prefix}/bin/whalebrew"

"${prefix}${target}/bin/whalebrew" completion bash >"${prefix}${target}/share/bash-completion/completions/whalebrew"
"${prefix}${target}/bin/whalebrew" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/whalebrew.fish"
"${prefix}${target}/bin/whalebrew" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_whalebrew"
"${prefix}/bin/whalebrew" completion bash >"${prefix}/share/bash-completion/completions/whalebrew"
"${prefix}/bin/whalebrew" completion fish >"${prefix}/share/fish/vendor_completions.d/whalebrew.fish"
"${prefix}/bin/whalebrew" completion zsh >"${prefix}/share/zsh/vendor-completions/_whalebrew"
EOF
12 changes: 7 additions & 5 deletions tools/whalesay/Dockerfile.template
@@ -1,12 +1,14 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
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 docker.cow ${prefix}${target}/share/cows/
COPY --chmod=0755 <<EOF ${prefix}${target}/bin/whalesay
COPY docker.cow ${prefix}/share/cows/
COPY --chmod=0755 <<EOF ${prefix}/bin/whalesay
#!/bin/bash
exec cowsay -f docker "\$@"
EOF