airshipctl/krm-functions/cloud-init/Dockerfile.sample
Vladimir Kozhukalov 6523c800ad Build ephemeral iso using generic container
We build iso image in two steps
 1) We prepare cloud-init data using a krm function
    krm-functions/cloud-init which uses arishipctl capabilities
    to gather necessary data from the executor document bundle.
    Cloud-init data files are written into a directory mounted
    to the krm function container.
 2) We build iso image using image-builder. While doing this
    we mount the directory with cloud-init data files and set
    necessary environment variables defined in the executor
    document.

Relates-To: #440
Change-Id: Id0b34822e95f494d2e2f8fb407700b7f873e7c69
2021-02-25 13:08:31 +00:00

12 lines
373 B
Docker

FROM gcr.io/gcp-runtimes/go1-builder:1.13 as builder
ENV CGO_ENABLED=0
WORKDIR /go/src/
COPY image/go.mod .
RUN /usr/local/go/bin/go mod download
COPY main.go .
RUN /usr/local/go/bin/go build -v -o /usr/local/bin/config-function ./
FROM alpine:latest
COPY --from=builder /usr/local/bin/config-function /usr/local/bin/config-function
CMD ["/usr/local/bin/config-function"]