index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2021-09-06 20:10:27.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2021-09-06 20:10:27.0 +00:00:00
commit
b2f09abdcce076d647fd97a4645db44d690df181 [patch]
tree
841d2c2d039e59f86b72938e6f93eae9483fbb2a
parent
d165213f375b5394736c97d68b348818d79b2d4a
download
b2f09abdcce076d647fd97a4645db44d690df181.tar.gz

refactor: remove optional extra docker scratch/alpine volumes

scratch/alpine docker images were creating an extra volume at /public.
the problem is that for example an extra docker volume can difficult
umounting shares on unRAID and other environments.

these extra docker volumes can be perfectly optional, so this commit
remove them of scratch and alpine images.

resolves #51

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