From 2f76d465467cfa65f4c95c8b580ea6a249773453 Mon Sep 17 00:00:00 2001 From: Michele Degges Date: Wed, 16 Feb 2022 12:03:47 -0800 Subject: [PATCH] Docker fixes --- .github/workflows/build.yml | 14 +++++++------- Dockerfile | 6 ++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69b63d551..ab7bb1e88 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -220,7 +220,7 @@ jobs: path: out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip build-docker-light: - name: Docker {{ matrix.arch }} light build + name: Docker light ${{ matrix.arch }} build needs: - get-product-version - build-linux @@ -246,9 +246,9 @@ jobs: - name: Docker Build (Action) uses: hashicorp/actions-docker-build@v1 with: - version: ${{env.version}} - target: release-default - arch: ${{matrix.arch}} + version: ${{ env.version }} + target: release-light + arch: ${{ matrix.arch }} tags: | docker.io/hashicorp/${{env.repo}}:light docker.io/hashicorp/${{env.repo}}:light-${{env.version}} @@ -258,7 +258,7 @@ jobs: public.ecr.aws/hashicorp/${{env.repo}}:${{env.version}} build-docker-full: - name: Docker {{ matrix.arch }} full build + name: Docker full ${{ matrix.arch }} build needs: - get-product-version - build-linux @@ -284,9 +284,9 @@ jobs: - name: Docker Build (Action) uses: hashicorp/actions-docker-build@v1 with: - version: ${{env.version}} + version: ${{ env.version }} target: release-full - arch: ${{matrix.arch}} + arch: ${{ matrix.arch }} tags: | docker.io/hashicorp/${{env.repo}}:full docker.io/hashicorp/${{env.repo}}:full-${{env.version}} diff --git a/Dockerfile b/Dockerfile index f55fbeaa4..1db9e317f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # # This Dockerfile contains multiple targets. # Use 'docker build --target= .' to build one. -# e.g. `docker build --target=release-default .` +# e.g. `docker build --target=release-light .` # # All non-dev targets have a VERSION argument that must be provided # via --build-arg=VERSION= when building. @@ -79,7 +79,7 @@ ENTRYPOINT ["/bin/packer"] # This image builds from the locally generated binary in ./bin/, and from CI-built binaries within CI. # To generate the local binary, run `make dev`. # This image is published to DockerHub under the `light`, `light-$VERSION`, and `latest` tags. -FROM docker.mirror.hashicorp.services/alpine:latest as release-default +FROM docker.mirror.hashicorp.services/alpine:latest as release-light ARG VERSION ARG BIN_NAME @@ -130,8 +130,6 @@ RUN git clone https://github.com/hashicorp/packer $GOPATH/src/github.com/hashico RUN /bin/bash $GOPATH/src/github.com/hashicorp/packer/scripts/build.sh -COPY /bin/ /bin/ - WORKDIR $GOPATH ENTRYPOINT ["/bin/packer"]