Skip to content

Commit

Permalink
Dockerfile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Mar 4, 2024
1 parent f860599 commit ae87726
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,11 +33,14 @@ LABEL name="HCP CLI" \
description="The hcp CLI allows interaction with the HashiCorp Cloud Platform using the command-line."

COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME /bin/
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"]

0 comments on commit ae87726

Please sign in to comment.