#Copy a container output to another container

1 messages · Page 1 of 1 (latest)

teal mauve
#

Hello all. I'd like to program the following pattern with the Go SDK. Is it possible?

FROM golang:1.17 AS builder

...

RUN go install -mod=vendor -v ./...

...

FROM gcr.io/google.com/cloudsdktool/cloud-sdk:alpine AS runtime
COPY --from=builder /go/bin/build_output .
jolly whale
#

Short answer: Yes 🙂

teal mauve
#

Thank you for the answer! I think there must be some example on this, but I couldn't find one. Could you kindly provide me some pointers?

#

One solution that I can think of is saving the first container build output to the host and mounting that host directory to the second container and use. But I'm not sure if that's the right pattern.

dim panther