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 u #2285

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 12 additions & 20 deletions tools/uidmap/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@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,22 +19,12 @@ ARG version
RUN <<EOF
curl -sL https://github.com/shadow-maint/shadow/releases/download/v${version}/shadow-${version}.tar.xz \
| tar -xJ --strip-components 1
./configure --prefix=/opt/uidmap --enable-static --disable-shared
./configure --prefix="${prefix}" --enable-static --disable-shared
make LDFLAGS=--static
mkdir -p \
/opt/uidmap/bin \
/opt/uidmap/share/man/man1
cp src/newuidmap /opt/uidmap/bin
cp src/newgidmap /opt/uidmap/bin
cp man/man1/newuidmap.1 /opt/uidmap/share/man/man1
cp man/man1/newgidmap.1 /opt/uidmap/share/man/man1
EOF

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
ARG name
ARG version
COPY --from=build /opt/uidmap/ ${prefix}${target}/
RUN <<EOF
chmod u+s "${prefix}${target}/bin/newuidmap"
chmod u+s "${prefix}${target}/bin/newgidmap"
cp src/newuidmap "${prefix}/bin"
cp src/newgidmap "${prefix}/bin"
cp man/man1/newuidmap.1 "${prefix}/share/man/man1"
cp man/man1/newgidmap.1 "${prefix}/share/man/man1"
chmod u+s "${prefix}/bin/newuidmap"
chmod u+s "${prefix}/bin/newgidmap"
EOF
12 changes: 7 additions & 5 deletions tools/umoci/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 "opencontainers/umoci" "v${version}" "umoci.${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/umoci" \
curl --silent --location --fail --output "${prefix}/bin/umoci" \
"https://github.com/opencontainers/umoci/releases/download/v${version}/umoci.${alt_arch}"
chmod +x "${prefix}${target}/bin/umoci"
chmod +x "${prefix}/bin/umoci"
EOF
18 changes: 10 additions & 8 deletions tools/uniget/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,19 +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 "uniget-org/cli" "v${version}" "uniget_Linux_${arch}.tar.gz"
curl --silent --location --fail \
"https://github.com/uniget-org/cli/releases/download/v${version}/uniget_Linux_${arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner \
uniget
chmod +x "${prefix}${target}/bin/uniget"
chmod +x "${prefix}/bin/uniget"

"${prefix}${target}/bin/uniget" completion bash >"${prefix}${target}/share/bash-completion/completions/uniget"
"${prefix}${target}/bin/uniget" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/uniget.fish"
"${prefix}${target}/bin/uniget" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_uniget"
"${prefix}/bin/uniget" completion bash >"${prefix}/share/bash-completion/completions/uniget"
"${prefix}/bin/uniget" completion fish >"${prefix}/share/fish/vendor_completions.d/uniget.fish"
"${prefix}/bin/uniget" completion zsh >"${prefix}/share/zsh/vendor-completions/_uniget"
EOF
28 changes: 15 additions & 13 deletions tools/updatecli/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 @@ -24,24 +26,24 @@ echo " Using ${arch_suffix}"
check-github-release-asset "updatecli/updatecli" "v${version}" "updatecli_Linux_${arch_suffix}.tar.gz"

curl --silent --location --fail "https://github.com/updatecli/updatecli/releases/download/v${version}/updatecli_Linux_${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
updatecli \
manpages \
completions

mv "${prefix}${target}/bin/manpages/updatecli.1.gz" "${prefix}${target}/share/man/man1/"
mv "${prefix}${target}/bin/completions/updatecli.bash" "${prefix}${target}/share/bash-completion/completions/updatecli"
mv "${prefix}${target}/bin/completions/updatecli.fish" "${prefix}${target}/share/fish/vendor_completions.d/updatecli.fish"
mv "${prefix}${target}/bin/completions/updatecli.zsh" "${prefix}${target}/share/zsh/vendor-completions/_updatecli"
mv "${prefix}/bin/manpages/updatecli.1.gz" "${prefix}/share/man/man1/"
mv "${prefix}/bin/completions/updatecli.bash" "${prefix}/share/bash-completion/completions/updatecli"
mv "${prefix}/bin/completions/updatecli.fish" "${prefix}/share/fish/vendor_completions.d/updatecli.fish"
mv "${prefix}/bin/completions/updatecli.zsh" "${prefix}/share/zsh/vendor-completions/_updatecli"

rmdir \
"${prefix}${target}/bin/manpages" \
"${prefix}${target}/bin/completions"
"${prefix}/bin/manpages" \
"${prefix}/bin/completions"
EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/updatecli" completion bash >"${prefix}${target}/share/bash-completion/completions/updatecli"
#"${prefix}${target}/bin/updatecli" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/updatecli.fish"
#"${prefix}${target}/bin/updatecli" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_updatecli"
#"${prefix}/bin/updatecli" completion bash >"${prefix}/share/bash-completion/completions/updatecli"
#"${prefix}/bin/updatecli" completion fish >"${prefix}/share/fish/vendor_completions.d/updatecli.fish"
#"${prefix}/bin/updatecli" completion zsh >"${prefix}/share/zsh/vendor-completions/_updatecli"
#EOF
12 changes: 7 additions & 5 deletions tools/upx/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#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 "upx/upx" "v${version}" "upx-${version}-${alt_arch}_linux.tar.xz"
curl --silent --location --fail "https://github.com/upx/upx/releases/download/v${version}/upx-${version}-${alt_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 \
"upx-${version}-${alt_arch}_linux/upx" \
"upx-${version}-${alt_arch}_linux/upx.1"
mv "${prefix}${target}/bin/upx.1" "${prefix}${target}/share/man/man1/"
mv "${prefix}/bin/upx.1" "${prefix}/share/man/man1/"
EOF
28 changes: 10 additions & 18 deletions tools/util-linux/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@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 @@ -27,22 +29,12 @@ git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}"
./autogen.sh
./configure --disable-shared
make LDFLAGS=--static
mkdir -p \
/opt/util-linux/bin \
/opt/util-linux/share/man/man1 \
/opt/util-linux/share/man/man8 \
/opt/util-linux/share/bash-completion/completions
cp lsns nsenter unshare /opt/util-linux/bin
cp lsns nsenter unshare "${prefix}/bin"
cp \
sys-utils/nsenter.1 sys-utils/unshare.1 \
/opt/util-linux/share/man/man1/
cp sys-utils/lsns.8 /opt/util-linux/share/man/man8/
"${prefix}/share/man/man1/"
cp sys-utils/lsns.8 "${prefix}/share/man/man8/"
cp \
bash-completion/lsns bash-completion/nsenter bash-completion/unshare \
/opt/util-linux/share/bash-completion/completions
EOF

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
ARG name
ARG version
COPY --from=build /opt/util-linux/ ${prefix}${target}/
"${prefix}/share/bash-completion/completions"
EOF
8 changes: 5 additions & 3 deletions tools/vale/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 Down
7 changes: 5 additions & 2 deletions tools/vault/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,7 +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
Expand Down
8 changes: 5 additions & 3 deletions tools/vcluster/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 Down
8 changes: 5 additions & 3 deletions tools/vendir/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 Down
8 changes: 5 additions & 3 deletions tools/venom/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 Down
12 changes: 7 additions & 5 deletions tools/vexctl/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/openvex/vexctl
Expand Down
12 changes: 7 additions & 5 deletions tools/vexy/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 / /
ARG name
Expand Down
8 changes: 5 additions & 3 deletions tools/vgrep/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 Down
8 changes: 5 additions & 3 deletions tools/vhs/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 Down
8 changes: 5 additions & 3 deletions tools/vland/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 Down
8 changes: 5 additions & 3 deletions tools/vscode-cli/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 Down
10 changes: 6 additions & 4 deletions tools/vulnerability-operator/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#syntax=docker/dockerfile:1.6.0

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

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

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=cosign / /
ARG name
ARG version
Expand Down