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 m #2357

Merged
merged 4 commits into from
Jan 1, 2024
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
10 changes: 6 additions & 4 deletions tools/mage/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,6 +26,6 @@ check-github-release-asset "magefile/mage" "v${version}" "mage_${version}_Linux-

echo "### Downloading mage ${version}"
curl --silent --location --fail "https://github.com/magefile/mage/releases/download/v${version}/mage_${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 \
mage
EOF
10 changes: 6 additions & 4 deletions tools/make/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 @@ -18,7 +20,7 @@ WORKDIR /tmp/make
RUN <<EOF
curl --silent --location --fail "https://ftp.gnu.org/gnu/make/make-${version}.tar.gz" \
| tar --extract --gzip --strip-components=1
./configure --prefix="${prefix}${target}"
./configure --prefix="${prefix}"
make LDFLAGS=-static
make install
EOF
18 changes: 10 additions & 8 deletions tools/mani/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -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 "alajmo/mani" "v${version}" "mani_${version}_linux_${alt_arch}.tar.gz"

curl --silent --location --fail "https://github.com/alajmo/mani/releases/download/v${version}/mani_${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 \
mani \
mani.1
mv "${prefix}${target}/bin/mani.1" "${prefix}${target}/share/man/man1/"
mv "${prefix}/bin/mani.1" "${prefix}/share/man/man1/"

"${prefix}${target}/bin/mani" completion bash >"${prefix}${target}/share/bash-completion/completions/mani"
"${prefix}${target}/bin/mani" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/mani.fish"
"${prefix}${target}/bin/mani" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_mani"
"${prefix}/bin/mani" completion bash >"${prefix}/share/bash-completion/completions/mani"
"${prefix}/bin/mani" completion fish >"${prefix}/share/fish/vendor_completions.d/mani.fish"
"${prefix}/bin/mani" completion zsh >"${prefix}/share/zsh/vendor-completions/_mani"
EOF
12 changes: 7 additions & 5 deletions tools/manifest-tool/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
check-github-release-asset "estesp/manifest-tool" "v${version}" "binaries-manifest-tool-${version}.tar.gz"
curl --silent --location --fail "https://github.com/estesp/manifest-tool/releases/download/v${version}/binaries-manifest-tool-${version}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner \
manifest-tool-linux-${alt_arch}
mv "${prefix}${target}/bin/manifest-tool-linux-${alt_arch}" "${prefix}${target}/bin/manifest-tool"
mv "${prefix}/bin/manifest-tool-linux-${alt_arch}" "${prefix}/bin/manifest-tool"
EOF
18 changes: 10 additions & 8 deletions tools/mapcidr/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#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
COPY --link --from=go / /
COPY --link --from=make / /
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 / /usr/local/
COPY --link --from=make / /usr/local/
WORKDIR /go/src/github.com/projectdiscovery/mapcidr
ARG name
ARG version
RUN <<EOF
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/projectdiscovery/mapcidr .
make
cp mapcidr "${prefix}${target}/bin/"
cp mapcidr "${prefix}/bin/"
EOF
20 changes: 11 additions & 9 deletions tools/markdownlint/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/nodejs:latest AS nodejs
FROM ghcr.io/uniget-org/tools/npm:latest AS npm

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

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 --link --from=nodejs / /
COPY --link --from=npm / /
WORKDIR ${prefix}${target}/libexec/markdownlint
COPY --link --from=nodejs / /usr/local/
COPY --link --from=npm / /usr/local/
WORKDIR /uniget_bootstrap/libexec/markdownlint
ARG name
ARG version
RUN <<EOF
npm install \
--omit=dev \
"markdownlint-cli@${version}"
ln --symbolic --relative --force "${prefix}${target}/libexec/markdownlint/node_modules/.bin/markdownlint" "${prefix}${target}/bin/"
ln --symbolic --relative --force "${prefix}/libexec/markdownlint/node_modules/.bin/markdownlint" "${prefix}/bin/"
EOF
16 changes: 9 additions & 7 deletions tools/marvin/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 "undistro/marvin" "v${version}" "marvin_Linux_${arch_suffix}.tar.gz"
curl --silent --location --fail "https://github.com/undistro/marvin/releases/download/v${version}/marvin_Linux_${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
marvin

"${prefix}${target}/bin/marvin" completion bash >"${prefix}${target}/share/bash-completion/completions/marvin"
"${prefix}${target}/bin/marvin" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/marvin.fish"
"${prefix}${target}/bin/marvin" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_marvin"
"${prefix}/bin/marvin" completion bash >"${prefix}/share/bash-completion/completions/marvin"
"${prefix}/bin/marvin" completion fish >"${prefix}/share/fish/vendor_completions.d/marvin.fish"
"${prefix}/bin/marvin" completion zsh >"${prefix}/share/zsh/vendor-completions/_marvin"
EOF
14 changes: 8 additions & 6 deletions tools/maven/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
mkdir -p "${prefix}${target}/opt/maven"
mkdir -p "${prefix}/opt/maven"
curl --silent --location --fail "https://archive.apache.org/dist/maven/maven-3/${version}/binaries/apache-maven-${version}-bin.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/opt/maven" --strip-components=1 --no-same-owner
ln --symbolic --relative --force "${prefix}${target}/opt/maven/bin/mvn" "${prefix}${target}/bin/mvn"
| tar --extract --gzip --directory="${prefix}/opt/maven" --strip-components=1 --no-same-owner
ln --symbolic --relative --force "${prefix}/opt/maven/bin/mvn" "${prefix}/bin/mvn"
EOF
20 changes: 11 additions & 9 deletions tools/mc/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
#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 --output "${prefix}${target}/bin/mc" \
curl --silent --location --fail --output "${prefix}/bin/mc" \
"https://dl.min.io/client/mc/release/linux-${alt_arch}/mc.RELEASE.${version}"
chmod +x "${prefix}${target}/bin/mc"
chmod +x "${prefix}/bin/mc"
EOF

COPY <<EOF ${prefix}${target}/share/bash-completion/completions/mc
complete -C ${target}/bin/mc mc
COPY <<EOF ${prefix}/share/bash-completion/completions/mc
complete -C /bin/mc mc
EOF

COPY <<EOF ${prefix}${target}/share/fish/vendor_completions.d/mc.fish
COPY <<EOF ${prefix}/share/fish/vendor_completions.d/mc.fish
function __complete_mc
set -lx COMP_LINE (commandline -cp)
test -z (commandline -ct)
and set COMP_LINE "$COMP_LINE "
${target}/bin/mc
/bin/mc
end
complete -f -c mc -a "(__complete_mc)"
EOF
10 changes: 6 additions & 4 deletions tools/mcfly/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/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 "cantino/mcfly" "v${version}" "mcfly-v${version}-${arch}-unknown-linux-musl.tar.gz"
curl --silent --location --fail "https://github.com/cantino/mcfly/releases/download/v${version}/mcfly-v${version}-${arch}-unknown-linux-musl.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner
EOF
18 changes: 10 additions & 8 deletions tools/melange/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/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
COPY --link --from=go / /
COPY --link --from=make / /
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 / /usr/local/
COPY --link --from=make / /usr/local/
WORKDIR /go/src/github.com/chainguard-dev/melange
ARG name
ARG version
RUN <<EOF
check-clone https://github.com/chainguard-dev/melange "v${version}"
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/chainguard-dev/melange .
make melange
cp melange "${prefix}${target}/bin/"
cp melange "${prefix}/bin/"
EOF
20 changes: 11 additions & 9 deletions tools/mermaid-cli/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/nodejs:latest AS nodejs
FROM ghcr.io/uniget-org/tools/npm:latest AS npm

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

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 --link --from=nodejs / /
COPY --link --from=npm / /
WORKDIR ${prefix}${target}/libexec/mermail-cli
COPY --link --from=nodejs / /usr/local/
COPY --link --from=npm / /usr/local/
WORKDIR /uniget_bootstrap/libexec/mermail-cli
ARG name
ARG version
RUN <<EOF
npm install \
--omit=dev \
"@mermaid-js/mermaid-cli@${version}"
ln --symbolic --relative --force "${prefix}${target}/libexec/mermail-cli/node_modules/.bin/mmdc" "${prefix}${target}/bin/"
ln --symbolic --relative --force "${prefix}/libexec/mermail-cli/node_modules/.bin/mmdc" "${prefix}/bin/"
EOF
12 changes: 7 additions & 5 deletions tools/micro/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#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 "micro/micro" "v${version}" "micro-v${version}-linux-${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/micro/micro/releases/download/v${version}/micro-v${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 \
micro

curl --silent --fail --show-error --location --output "${prefix}${target}/etc/systemd/system/micro.service" \
curl --silent --fail --show-error --location --output "${prefix}/etc/systemd/system/micro.service" \
"https://github.com/micro/micro/raw/v${version}/scripts/systemd/micro.service"
EOF
12 changes: 7 additions & 5 deletions tools/miller/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#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 "johnkerl/miller" "v${version}" "miller-${version}-linux-${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/johnkerl/miller/releases/download/v${version}/miller-${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 \
"miller-${version}-linux-${alt_arch}/mlr"

curl --silent --location --fail --output "${prefix}${target}/share/man/man1/mlr.1" \
curl --silent --location --fail --output "${prefix}/share/man/man1/mlr.1" \
"https://github.com/johnkerl/miller/raw/v${version}/man/mlr.1"
EOF
Loading