Skip to content

Commit

Permalink
Improve build #2213
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Jan 10, 2024
1 parent aad3ebe commit 4614b1a
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions tools/k8spacket/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#syntax=docker/dockerfile:1.6.0

FROM golang:1.21.5@sha256:672a2286da3ee7a854c3e0a56e0838918d0dbb1c18652992930293312de898a6 AS build
FROM ghcr.io/uniget-org/tools/go:latest AS go

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/
RUN <<EOF
apt-get update
apt-get -y install \
Expand All @@ -15,14 +22,5 @@ ARG version
ENV GOPROXY=direct
RUN <<EOF
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/k8spacket/k8spacket .
go build -o /usr/local/bin/k8spacket .
go build -o "${prefix}/bin/k8spacket" .
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/bin/k8spacket /uniget_bootstrap/bin/

0 comments on commit 4614b1a

Please sign in to comment.