From 2f329c4e93596c7bdc01786628708c7df38fa603 Mon Sep 17 00:00:00 2001 From: Jacob Mammoliti Date: Tue, 21 Sep 2021 09:46:17 -0400 Subject: [PATCH] chore: Docker Build fixes (#1502) Pass correct context to docker build for multiarch and dev build targets. * fixed missing file errors; bumped boundary version * downgraded alpine due to build issues * fixing makefile * bumping boundary and alpine versions * fixed docker directory in makefile and dockerfile * updating dev.dockerfile & makefile --- Makefile | 7 ++++--- docker/Dev.dockerfile | 2 +- docker/Release.dockerfile | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 0b0f3e6f00..a6f49ce055 100644 --- a/Makefile +++ b/Makefile @@ -200,13 +200,14 @@ docker-multiarch-build: --tag hashicorp/boundary:latest \ --build-arg VERSION=$(VERSION) \ --platform linux/amd64,linux/arm64 \ - --file $(DOCKER_DIR)/Release.dockerfile . - + --file $(DOCKER_DIR)/Release.dockerfile docker/ + # builds from locally generated binary in bin/ docker-build-dev: export XC_OSARCH=linux/amd64 docker-build-dev: dev + cp -r bin docker/ docker build -t $(IMAGE_TAG_DEV) \ - -f $(DOCKER_DIR)/Dev.dockerfile . + -f $(DOCKER_DIR)/Dev.dockerfile docker/ # requires appropriate permissions in dockerhub docker-publish: diff --git a/docker/Dev.dockerfile b/docker/Dev.dockerfile index 633dafe9bc..fce88d1357 100644 --- a/docker/Dev.dockerfile +++ b/docker/Dev.dockerfile @@ -6,7 +6,7 @@ RUN addgroup boundary && \ ADD bin/boundary /bin/boundary RUN mkdir /boundary/ -ADD docker/config.hcl /boundary/config.hcl +ADD ./config.hcl /boundary/config.hcl RUN chown -R boundary:boundary /boundary/ EXPOSE 9200 9201 9202 diff --git a/docker/Release.dockerfile b/docker/Release.dockerfile index ae7d832dd0..2a52c965f4 100644 --- a/docker/Release.dockerfile +++ b/docker/Release.dockerfile @@ -1,4 +1,4 @@ -FROM docker.mirror.hashicorp.services/alpine:3.13 +FROM docker.mirror.hashicorp.services/alpine:3.13.6 ARG VERSION=0.6.1 @@ -40,6 +40,6 @@ RUN chown -R boundary:boundary /boundary/ EXPOSE 9200 9201 9202 VOLUME /boundary/ -COPY ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh +COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh ENTRYPOINT ["docker-entrypoint.sh"] -CMD ["server", "-config", "/boundary/config.hcl"] \ No newline at end of file +CMD ["server", "-config", "/boundary/config.hcl"]