From 39cc9fdcfe931dc412e55d44bcfe1c0276c5dfe6 Mon Sep 17 00:00:00 2001 From: AJ Date: Mon, 19 Aug 2019 11:32:53 -0700 Subject: [PATCH] Add Dockerfile to build vendor-cli via goreleaser. --- .goreleaser.yml | 7 +++++++ .travis.yml | 1 + deploy/Dockerfile | 7 +++++++ 3 files changed, 15 insertions(+) create mode 100644 deploy/Dockerfile diff --git a/.goreleaser.yml b/.goreleaser.yml index 27c6e310e..54f43098a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -42,3 +42,10 @@ snapshot: name_template: SNAPSHOT-{{ .Commit }} build: hooks: {} +dockers: + - dockerfile: deploy/Dockerfile + image_templates: + - "replicated/vendor-cli:latest" + - "replicated/vendor-cli:{{ .Major }}" + - "replicated/vendor-cli:{{ .Major }}.{{ .Minor }}" + - "replicated/vendor-cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}" diff --git a/.travis.yml b/.travis.yml index 8dc90e0c8..8f324d022 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,6 @@ script: - make docs # we care less about the generated docs than we do about the fact that the command is not broken after_success: - test -n "$TRAVIS_TAG" && make package_docker_docs + - test -n "$TRAVIS_TAG" && docker login -u="$DOCKERHUB_DOCKER_USER" -p="$DOCKERHUB_DOCKER_PASS" - test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash - test -n "$TRAVIS_TAG" && make publish-pacts diff --git a/deploy/Dockerfile b/deploy/Dockerfile new file mode 100644 index 000000000..8361261f4 --- /dev/null +++ b/deploy/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:latest +RUN apk add --no-cache ca-certificates curl git && update-ca-certificates +COPY replicated /replicated +ENV IN_CONTAINER 1 +LABEL "com.replicated.vendor_cli"="true" +WORKDIR /out +ENTRYPOINT [ "/replicated" ]