-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add dockerfile * add docker build to circleci * fix messages * add build config * fix circle config * use orb * fix go version * build from scratch * remove extra refs * fix config location * fix rok8s * remove old job * add ARG directives * change CMD to ENTRYPOINT
- Loading branch information
Showing
3 changed files
with
74 additions
and
4 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,10 @@ | ||
DOCKERFILE='Dockerfile' | ||
|
||
EXTERNAL_REGISTRY_BASE_DOMAIN=quay.io | ||
REPOSITORY_NAME=fairwinds/pluto | ||
DOCKERTAG=${EXTERNAL_REGISTRY_BASE_DOMAIN}/${REPOSITORY_NAME} | ||
if [[ -n $CI_TAG ]]; then | ||
ADDITIONAL_DOCKER_TAG_VERSIONS=() | ||
ADDITIONAL_DOCKER_TAG_VERSIONS+=(`echo $CI_TAG | sed -e 's/\(\w\+\)\..*$/\1/'`) | ||
ADDITIONAL_DOCKER_TAG_VERSIONS+=(`echo $CI_TAG | sed -e 's/\(\w\+\.\w\+\)\..*$/\1/'`) | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM golang:1.14.3 AS build-env | ||
WORKDIR /go/src/github.com/fairwindsops/pluto/ | ||
|
||
ARG version=dev | ||
ARG commit=none | ||
|
||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
|
||
COPY . . | ||
RUN VERSION=$version COMMIT=$commit make build-linux | ||
|
||
|
||
FROM alpine:3.12.0 as alpine | ||
RUN apk --no-cache --update add ca-certificates tzdata && update-ca-certificates | ||
|
||
|
||
FROM scratch | ||
COPY --from=alpine /usr/share/zoneinfo /usr/share/zoneinfo | ||
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=alpine /etc/passwd /etc/passwd | ||
|
||
USER nobody | ||
COPY --from=build-env /go/src/github.com/fairwindsops/pluto / | ||
|
||
WORKDIR /opt/app | ||
|
||
ENTRYPOINT ["/pluto"] |