-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a Docker image with bundled schemas
For cases where you don't want to hit the network the new offline images contain the downloaded schemas.
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM golang:1.8-alpine as builder | ||
RUN apk --no-cache add make git | ||
RUN mkdir -p /go/src/github.com/garethr/kubeval/ | ||
COPY . /go/src/github.com/garethr/kubeval/ | ||
WORKDIR /go/src/github.com/garethr/kubeval/ | ||
RUN make linux | ||
|
||
FROM alpine:latest as schemas | ||
RUN apk --no-cache add git | ||
RUN git clone https://github.com/garethr/kubernetes-json-schema.git | ||
RUN git clone https://github.com/garethr/openshift-json-schema.git | ||
|
||
FROM alpine:latest | ||
RUN apk --no-cache add ca-certificates | ||
COPY --from=builder /go/src/github.com/garethr/kubeval/bin/linux/amd64/kubeval . | ||
COPY --from=schemas /kubernetes-json-schema /schemas/kubernetes-json-schema/master | ||
COPY --from=schemas /openshift-json-schema /schemas/openshift-json-schema/master | ||
ENV KUBEVAL_SCHEMA_LOCATION=file:///schemas | ||
ENTRYPOINT ["/kubeval"] | ||
CMD ["--help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters