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 i #2289

Merged
merged 3 commits into from
Dec 30, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions tools/ignite/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#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 "weaveworks/ignite" "v${version}" "ignite-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/ignite" \
curl --silent --location --fail --output "${prefix}/bin/ignite" \
"https://github.com/weaveworks/ignite/releases/download/v${version}/ignite-${alt_arch}"
chmod +x "${prefix}${target}/bin/ignite"
chmod +x "${prefix}/bin/ignite"

check-github-release-asset "weaveworks/ignite" "v${version}" "ignited-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/ignited" \
curl --silent --location --fail --output "${prefix}/bin/ignited" \
"https://github.com/weaveworks/ignite/releases/download/v${version}/ignited-${alt_arch}"
chmod +x "${prefix}${target}/bin/ignited"
chmod +x "${prefix}/bin/ignited"

"${prefix}${target}/bin/ignite" completion >"${prefix}${target}/share/bash-completion/completions/ignite"
"${prefix}${target}/bin/ignited" completion >"${prefix}${target}/share/bash-completion/completions/ignited" || true
"${prefix}/bin/ignite" completion >"${prefix}/share/bash-completion/completions/ignite"
"${prefix}/bin/ignited" completion >"${prefix}/share/bash-completion/completions/ignited" || true
EOF
12 changes: 7 additions & 5 deletions tools/img/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -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 "genuinetools/img" "v${version}" "img-linux-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/img" \
curl --silent --location --fail --output "${prefix}/bin/img" \
"https://github.com/genuinetools/img/releases/download/v${version}/img-linux-${alt_arch}"
chmod +x "${prefix}${target}/bin/img"
chmod +x "${prefix}/bin/img"
EOF
14 changes: 8 additions & 6 deletions tools/imgcrypt/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#syntax=docker/dockerfile:1.6.0

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

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

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" ]
COPY --link --from=go / /
COPY --link --from=make / /
WORKDIR /go/src/github.com/containerd/imgcrypt
Expand All @@ -17,5 +19,5 @@ git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}"
sed -i -E 's/ -v / /' Makefile
sed -i -E "s/ --dirty='.m' / /" Makefile
make
make install DESTDIR="${prefix}${target}/"
make install DESTDIR="${prefix}/"
EOF
12 changes: 7 additions & 5 deletions tools/imgpkg/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -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 "carvel-dev/imgpkg" "v${version}" "imgpkg-linux-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/imgpkg" \
curl --silent --location --fail --output "${prefix}/bin/imgpkg" \
"https://github.com/carvel-dev/imgpkg/releases/download/v${version}/imgpkg-linux-${alt_arch}"
chmod +x "${prefix}${target}/bin/imgpkg"
chmod +x "${prefix}/bin/imgpkg"
EOF
20 changes: 11 additions & 9 deletions tools/in-toto/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#syntax=docker/dockerfile:1.6.0

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

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

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" ]
COPY --link --from=go / /
COPY --link --from=make / /
WORKDIR /go/src/github.com/in-toto/in-toto-golang
Expand All @@ -15,8 +17,8 @@ RUN <<EOF
check-clone https://github.com/in-toto/in-toto-golang "v${version}"
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/in-toto/in-toto-golang .
make build
cp bin/in-toto "${prefix}${target}/bin/"
"${prefix}${target}/bin/in-toto" completion bash >"${prefix}${target}/share/bash-completion/completions/in-toto"
"${prefix}${target}/bin/in-toto" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/in-toto.fish"
"${prefix}${target}/bin/in-toto" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_in-toto"
cp bin/in-toto "${prefix}/bin/"
"${prefix}/bin/in-toto" completion bash >"${prefix}/share/bash-completion/completions/in-toto"
"${prefix}/bin/in-toto" completion fish >"${prefix}/share/fish/vendor_completions.d/in-toto.fish"
"${prefix}/bin/in-toto" completion zsh >"${prefix}/share/zsh/vendor-completions/_in-toto"
EOF
12 changes: 7 additions & 5 deletions tools/incus/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -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 "lxc/incus" "v${version}" "bin.linux.incus.${arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/incus" \
curl --silent --location --fail --output "${prefix}/bin/incus" \
"https://github.com/lxc/incus/releases/download/v${version}/bin.linux.incus.${arch}"
chmod +x "${prefix}${target}/bin/incus"
chmod +x "${prefix}/bin/incus"
EOF
14 changes: 8 additions & 6 deletions tools/influx-cli/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#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
curl --silent --location --fail "https://dl.influxdata.com/influxdb/releases/influxdb2-client-${version}-linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --strip-component=1 --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --strip-component=1 --no-same-owner \
"./influx"
"${prefix}${target}/bin/influx" completion bash >"${prefix}${target}/share/bash-completion/completions/influx"
"${prefix}${target}/bin/influx" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_influx"
"${prefix}/bin/influx" completion bash >"${prefix}/share/bash-completion/completions/influx"
"${prefix}/bin/influx" completion zsh >"${prefix}/share/zsh/vendor-completions/_influx"
EOF
10 changes: 6 additions & 4 deletions tools/influxdb/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -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-download "https://dl.influxdata.com/influxdb/releases/influxdb2-${version}_linux_${alt_arch}.tar.gz"
curl --silent --location --fail "https://dl.influxdata.com/influxdb/releases/influxdb2-${version}_linux_${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --strip-components=1 --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --strip-components=1 --no-same-owner \
"influxdb2-${version}/usr/bin/influxd"
EOF
16 changes: 9 additions & 7 deletions tools/ingress2gateway/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -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 @@ -23,10 +25,10 @@ echo " Using ${arch_suffix}"

check-github-release-asset "kubernetes-sigs/ingress2gateway" "v${version}" "ingress2gateway_Linux_${arch_suffix}.tar.gz"
curl --silent --location --fail "https://github.com/kubernetes-sigs/ingress2gateway/releases/download/v${version}/ingress2gateway_Linux_${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
ingress2gateway

"${prefix}${target}/bin/ingress2gateway" completion bash >"${prefix}${target}/share/bash-completion/completions/ingress2gateway"
"${prefix}${target}/bin/ingress2gateway" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/ingress2gateway.fish"
"${prefix}${target}/bin/ingress2gateway" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_ingress2gateway"
"${prefix}/bin/ingress2gateway" completion bash >"${prefix}/share/bash-completion/completions/ingress2gateway"
"${prefix}/bin/ingress2gateway" completion fish >"${prefix}/share/fish/vendor_completions.d/ingress2gateway.fish"
"${prefix}/bin/ingress2gateway" completion zsh >"${prefix}/share/zsh/vendor-completions/_ingress2gateway"
EOF
17 changes: 7 additions & 10 deletions tools/inotify-tools/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ubuntu:22.04 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 @@ -23,12 +25,7 @@ ARG version
RUN <<EOF
git clone -q --config advice.detachedHead=false --depth 1 --branch "${version}" https://github.com/inotify-tools/inotify-tools .
./autogen.sh
./configure --prefix=/opt/inotify-tools --enable-static-binary --enable-fanotify
./configure --prefix="${prefix}${target}" --enable-static-binary --enable-fanotify
make LDFLAGS=--static
make install
EOF

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
ARG name
ARG version
COPY --from=build /opt/inotify-tools/ ${prefix}${target}/
EOF
16 changes: 9 additions & 7 deletions tools/iptables/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#syntax=docker/dockerfile:1.6.0

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

FROM ghcr.io/uniget-org/tools/make:${ref} AS make
FROM ghcr.io/uniget-org/tools/libmnl:${ref} AS libmnl
FROM ghcr.io/uniget-org/tools/libnftnl:${ref} AS libnftnl

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" ]
RUN <<EOF
apt-get update
apt-get -y install --no-install-recommends \
Expand All @@ -29,7 +31,7 @@ git clone --config advice.detachedHead=false --depth 1 --branch "v${version}" gi
EOF
RUN <<EOF
./autogen.sh
./configure --prefix="${prefix}${target}"
./configure --prefix="${prefix}"
make
make install
EOF
14 changes: 8 additions & 6 deletions tools/it-depends/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#syntax=docker/dockerfile:1.6.0

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

#FROM ghcr.io/uniget-org/tools/python:${ref} AS python
FROM ghcr.io/uniget-org/tools/shiv:${ref} AS shiv

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" ]
#COPY --link --from=python / /
COPY --link --from=shiv / /
RUN <<EOF
Expand All @@ -18,5 +20,5 @@ EOF
ARG name
ARG version
RUN <<EOF
shiv --output-file "${prefix}${target}/bin/it-depends" --console-script it-depends "it-depends==${version}"
shiv --output-file "${prefix}/bin/it-depends" --console-script it-depends "it-depends==${version}"
EOF