From 5f3581be3af69004fc7e90aaa857877692720667 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Mon, 22 Jan 2024 18:15:09 -0700 Subject: [PATCH] Update function-builder and squash dockerimage in release Signed-off-by: Darren Shepherd --- Dockerfile | 17 +++++++++++++---- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index c05d20265..3f4d1fa4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile:1.3-labs +# syntax=docker/dockerfile:1.4 FROM ghcr.io/acorn-io/images-mirror/tonistiigi/binfmt:qemu-v8.1.4 AS binfmt FROM ghcr.io/acorn-io/images-mirror/coredns/coredns:1.10.1 AS coredns @@ -63,6 +63,12 @@ COPY /scripts/acorn-job-helper-init /usr/local/bin COPY /scripts/acorn-job-helper-shutdown /usr/local/bin COPY /scripts/acorn-job-get-output /usr/local/bin COPY /scripts/k3s-config.yaml /etc/rancher/k3s/config.yaml + +FROM base AS basewithrelease +COPY acorn /usr/local/bin/acorn + +FROM scratch AS goreleaser +COPY --link --from=basewithrelease / / CMD [] WORKDIR /wd VOLUME /var/lib/buildkit @@ -70,8 +76,11 @@ VOLUME /var/lib/rancher/k3s STOPSIGNAL SIGTERM ENTRYPOINT ["/usr/local/bin/acorn"] -FROM base AS goreleaser -COPY acorn /usr/local/bin/acorn - FROM base COPY --from=build /src/bin/acorn /usr/local/bin/acorn +CMD [] +WORKDIR /wd +VOLUME /var/lib/buildkit +VOLUME /var/lib/rancher/k3s +STOPSIGNAL SIGTERM +ENTRYPOINT ["/usr/local/bin/acorn"] diff --git a/go.mod b/go.mod index 9b4ec37d9..22b57931c 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/acorn-io/aml/cli v0.0.0-20240106192317-21afc7320c77 github.com/acorn-io/baaah v0.0.0-20240119160309-2a58ee757bbd github.com/acorn-io/broadcaster v0.0.0-20240105011354-bfadd4a7b45d - github.com/acorn-io/function-builder v0.0.0-20240111042311-041315dd7091 + github.com/acorn-io/function-builder v0.0.0-20240123010942-72663ff4da5d github.com/acorn-io/mink v0.0.0-20240105015834-b1f7af4fadea github.com/acorn-io/namegenerator v0.0.0-20220915160418-9e3d5a0ffe78 github.com/acorn-io/schemer v0.0.0-20240105014212-9739d5485208 diff --git a/go.sum b/go.sum index 42e530b66..0ce5451e0 100644 --- a/go.sum +++ b/go.sum @@ -119,8 +119,8 @@ github.com/acorn-io/broadcaster v0.0.0-20240105011354-bfadd4a7b45d h1:hfpNQkJ4I2 github.com/acorn-io/broadcaster v0.0.0-20240105011354-bfadd4a7b45d/go.mod h1:WF6FYrEqW0+ZtY5OKb21JhSL0aeL5VJoVrm+u0d4gOE= github.com/acorn-io/cmd v0.0.0-20230929053520-ebe1b9879b38 h1:oJMGvI702ZW5L0JjJfGV9ekzU2IqqTGjmAQl4gkO6Ro= github.com/acorn-io/cmd v0.0.0-20230929053520-ebe1b9879b38/go.mod h1:bo9ONX4kagbQmXcG4bnfoK53MBFFtbUZ5fR7s9NfS+M= -github.com/acorn-io/function-builder v0.0.0-20240111042311-041315dd7091 h1:l+cuQsOK7aoC8VIq6C+Q98Svq9OgmzNCWuCcWhRw27w= -github.com/acorn-io/function-builder v0.0.0-20240111042311-041315dd7091/go.mod h1:b60OzYlyV4fuiTw3HExgOJITsXnfm0c0uIoywz7s+Y4= +github.com/acorn-io/function-builder v0.0.0-20240123010942-72663ff4da5d h1:05AOdsXorztXfFnD/n/bUDXeyKQj6Tf1cZk9TxR4rIA= +github.com/acorn-io/function-builder v0.0.0-20240123010942-72663ff4da5d/go.mod h1:b60OzYlyV4fuiTw3HExgOJITsXnfm0c0uIoywz7s+Y4= github.com/acorn-io/mink v0.0.0-20240105015834-b1f7af4fadea h1:HyH8nh7zZ7qZeWOjBGtK/iAI5gCu/c5iSnN703hlHHY= github.com/acorn-io/mink v0.0.0-20240105015834-b1f7af4fadea/go.mod h1:EmoDPUYsPyBEhEpSC+LpRGUs2GeSI5nPOTa7WO7jwlc= github.com/acorn-io/namegenerator v0.0.0-20220915160418-9e3d5a0ffe78 h1:5zs9L/CXNkuTdJSbhFWczAorbmx67nqlqswx5CQi7XI=