From d17149554e97678955545518d4e8057882de3944 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Fri, 1 Mar 2024 10:54:06 -0800 Subject: [PATCH] Dockerfile fixes --- .github/workflows/build.yml | 2 +- Dockerfile | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a671b3cc..08339f78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,7 +149,7 @@ jobs: uses: hashicorp/actions-docker-build@v1 with: smoke_test: | - TEST_VERSION="$(docker run "${IMAGE_NAME}" version | awk '/hcp v/{print $2}')" + TEST_VERSION="$(docker run "${IMAGE_NAME}" hcp version | awk '/hcp v/{print $2}')" if [ "${TEST_VERSION}" != "${{ env.product_version }}" ]; then printf "fail: container smoke test, got=%q want=%q\n" "${TEST_VERSION}" "${{ env.product_version }}" exit 1 diff --git a/Dockerfile b/Dockerfile index dfe3a8fe..324be6c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN touch ~/.bashrc && hcp --autocomplete-install CMD ["/bin/bash"] ## DOCKERHUB DOCKERFILE ## -FROM alpine:3.19 as default +FROM alpine:3.19 as release ARG BIN_NAME ARG NAME=hcp @@ -32,12 +32,15 @@ LABEL name="HCP CLI" \ summary="The hcp CLI allows interaction with the HashiCorp Cloud Platform." \ description="The hcp CLI allows interaction with the HashiCorp Cloud Platform using the command-line." -COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME /bin/ +COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME /bin/hcp +RUN ls -lh /bin RUN apk --no-cache upgrade && apk --no-cache add \ bash \ curl \ jq \ nano \ vim -RUN touch ~/.bashrc && hcp --autocomplete-install +RUN touch ~/.bashrc +RUN echo $PATH +# RUN hcp --autocomplete-install CMD ["/bin/bash"]