index : static-web-server.git

ascending towards madness

author Jose Quintana <1700322+joseluisq@users.noreply.github.com> 2021-09-07 18:38:43.0 +00:00:00
committer GitHub <noreply@github.com> 2021-09-07 18:38:43.0 +00:00:00
commit
e47079c5718019a4ba4102a1deae8925a41b78af [patch]
tree
841d2c2d039e59f86b72938e6f93eae9483fbb2a
parent
d165213f375b5394736c97d68b348818d79b2d4a
parent
b2f09abdcce076d647fd97a4645db44d690df181
download
e47079c5718019a4ba4102a1deae8925a41b78af.tar.gz

Merge pull request #52 from joseluisq/feature/remove_extra_docker_volumes

refactor: remove extra docker scratch/alpine volumes

Diff

 Makefile                  | 10 +++++++++-
 docker/alpine/Dockerfile  |  1 -
 docker/scratch/Dockerfile |  1 -
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index b0fa04f..ce391b1 100644
--- a/Makefile
+++ b/Makefile
@@ -117,10 +117,18 @@ fmt:
	@cargo fmt --all
.PHONY: fmt

docker.image:
	@echo "Creating Docker Scratch image..."
	@docker build \
		--rm=true -f ./docker/scratch/Dockerfile \
		--build-arg SERVER_VERSION="${PKG_TAG}" -t joseluisq/${PKG_NAME}:devel . --pull=true
.PHONY: docker.image

docker.image.alpine:
	@echo "Creating Docker Alpine image..."
	@docker build \
		--rm=true -f ./docker/alpine/Dockerfile \
		--build-arg SERVER_VERSION="alpine" -t ${PKG_NAME}:alpine . --pull=true
		--build-arg SERVER_VERSION="${PKG_TAG}" -t joseluisq/${PKG_NAME}:devel-alpine . --pull=true
.PHONY: docker.image.alpine


diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile
index e45084a..f8e4708 100644
--- a/docker/alpine/Dockerfile
+++ b/docker/alpine/Dockerfile
@@ -19,7 +19,6 @@ COPY ./docker/alpine/entrypoint.sh /
COPY ./docker/public /public

EXPOSE 80
VOLUME ["/public"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["static-web-server"]

diff --git a/docker/scratch/Dockerfile b/docker/scratch/Dockerfile
index 758e965..2124c10 100644
--- a/docker/scratch/Dockerfile
+++ b/docker/scratch/Dockerfile
@@ -15,7 +15,6 @@ COPY --from=latest /usr/local/bin/static-web-server /
COPY ./docker/public /public

EXPOSE 80
VOLUME ["/public"]
ENTRYPOINT ["/static-web-server"]

# Metadata