From b2f09abdcce076d647fd97a4645db44d690df181 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Mon, 6 Sep 2021 22:10:27 +0200 Subject: [PATCH] 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 --- 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 -- libgit2 1.7.2