6523c800ad
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
12 lines
373 B
Docker
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"]
|