mirror of
https://github.com/static-web-server/static-web-server.git
synced 2026-01-25 05:06:33 +00:00
refactor: docker images to use new binary source
This commit is contained in:
@@ -9,18 +9,17 @@ LABEL version="${SERVER_VERSION}" \
|
||||
|
||||
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;
|
||||
wget --quiet -O /tmp/static-web-server.tar.gz "https://github.com/joseluisq/static-web-server/releases/download/v$SERVER_VERSION/static-web-server-v$SERVER_VERSION-x86_64-unknown-linux-musl.tar.gz"; \
|
||||
tar xzvf /tmp/static-web-server.tar.gz; \
|
||||
cp static-web-server-v${SERVER_VERSION}-x86_64-unknown-linux-musl/static-web-server /usr/local/bin/; \
|
||||
rm -rf /tmp/static-web-server.tar.gz static-web-server-v${SERVER_VERSION}-x86_64-unknown-linux-musl; \
|
||||
chmod +x /usr/local/bin/static-web-server
|
||||
|
||||
COPY ./docker/alpine/entrypoint.sh /
|
||||
COPY ./bin/static-web-server /usr/local/bin/
|
||||
COPY ./public /public
|
||||
|
||||
EXPOSE 80
|
||||
VOLUME ["/public"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["static-web-server"]
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
ARG SERVER_VERSION=0.0.0
|
||||
|
||||
FROM joseluisq/static-web-server:${SERVER_VERSION}-alpine AS latest
|
||||
|
||||
FROM scratch
|
||||
|
||||
ARG SERVER_VERSION=0.0.0
|
||||
@@ -7,7 +11,7 @@ LABEL version="${SERVER_VERSION}" \
|
||||
description="A blazing fast and asynchronous web server for static files-serving." \
|
||||
maintainer="Jose Quintana <joseluisq.net>"
|
||||
|
||||
COPY ./bin/static-web-server /
|
||||
COPY --from=latest /usr/local/bin/static-web-server /
|
||||
COPY ./public /public
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user