...

Text file src/github.com/instrumenta/kubeval/Dockerfile.offline

Documentation: github.com/instrumenta/kubeval

     1FROM golang:1.12-alpine as builder
     2RUN apk --no-cache add make git
     3WORKDIR /
     4COPY . /
     5RUN make build
     6
     7FROM alpine:latest as schemas
     8RUN apk --no-cache add git
     9RUN git clone --depth 1 https://github.com/instrumenta/kubernetes-json-schema.git
    10RUN git clone --depth 1 https://github.com/garethr/openshift-json-schema.git
    11
    12FROM schemas as standalone-schemas
    13RUN cd kubernetes-json-schema/master && \
    14    find -maxdepth 1 -type d -not -name "." -not -name "*-standalone*" | xargs rm -rf
    15
    16FROM alpine:latest
    17RUN apk --no-cache add ca-certificates
    18COPY --from=builder /bin/kubeval .
    19COPY --from=standalone-schemas /kubernetes-json-schema /schemas/kubernetes-json-schema/master
    20COPY --from=standalone-schemas /openshift-json-schema /schemas/openshift-json-schema/master
    21ENV KUBEVAL_SCHEMA_LOCATION=file:///schemas
    22RUN ln -s /kubeval /usr/local/bin/kubeval
    23ENTRYPOINT ["/kubeval"]
    24CMD ["--help"]

View as plain text