From 478d1009756ca2fe514ed857f60218998012ea6d Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Tue, 3 Mar 2020 15:51:39 +0100 Subject: [PATCH] refactor: rename alpine dockerfile template --- docker/alpine/Dockerfile.tmpl | 26 -------------------------- docker/alpine/tmpl.Dockerfile | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 26 deletions(-) delete mode 100644 docker/alpine/Dockerfile.tmpl create mode 100644 docker/alpine/tmpl.Dockerfile diff --git a/docker/alpine/Dockerfile.tmpl b/docker/alpine/Dockerfile.tmpl deleted file mode 100644 index 64b509f..0000000 --- a/docker/alpine/Dockerfile.tmpl +++ /dev/null @@ -1,26 +0,0 @@ -FROM alpine:$ALPINE_VERSION - -LABEL maintainer="Jose Quintana " - -RUN apk --no-cache add ca-certificates tzdata -RUN set -ex; \ - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - armhf) arch='armv6' ;; \ - aarch64) arch='arm64' ;; \ - x86_64) arch='amd64' ;; \ - *) echo >&2 "error: unsupported architecture: $apkArch"; exit 1 ;; \ - esac; - -COPY ./bin/static-web-server /usr/local/bin/ -COPY ./public /public -EXPOSE 80 -CMD ["static-web-server"] - -# Metadata -LABEL org.opencontainers.image.vendor="Jose Quintana" \ - org.opencontainers.image.url="https://github.com/joseluisq/static-web-server" \ - org.opencontainers.image.title="Static Web Server" \ - org.opencontainers.image.description="A blazing fast static files-serving web server powered by Rust Iron." \ - org.opencontainers.image.version="$VERSION" \ - org.opencontainers.image.documentation="https://github.com/joseluisq/static-web-server" diff --git a/docker/alpine/tmpl.Dockerfile b/docker/alpine/tmpl.Dockerfile new file mode 100644 index 0000000..9b73267 --- /dev/null +++ b/docker/alpine/tmpl.Dockerfile @@ -0,0 +1,28 @@ +FROM alpine:$ALPINE_VERSION + +LABEL maintainer="Jose Quintana " + +RUN apk --no-cache add ca-certificates tzdata +RUN set -ex; \ + apkArch="$(apk --print-arch)"; \ + case "$apkArch" in \ + armhf) arch='armv6' ;; \ + aarch64) arch='arm64' ;; \ + x86_64) arch='amd64' ;; \ + *) echo >&2 "error: unsupported architecture: $apkArch"; exit 1 ;; \ + esac; + +COPY ./docker/alpine/entrypoint.sh / +COPY ./bin/static-web-server /usr/local/bin/ +COPY ./public /public +EXPOSE 80 +ENTRYPOINT ["/entrypoint.sh"] +CMD ["static-web-server"] + +# Metadata +LABEL org.opencontainers.image.vendor="Jose Quintana" \ + org.opencontainers.image.url="https://github.com/joseluisq/static-web-server" \ + org.opencontainers.image.title="Static Web Server" \ + org.opencontainers.image.description="A blazing fast static files-serving web server powered by Rust Iron." \ + org.opencontainers.image.version="$VERSION" \ + org.opencontainers.image.documentation="https://github.com/joseluisq/static-web-server" -- libgit2 1.7.2