index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2019-09-05 22:04:57.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2019-09-05 22:04:57.0 +00:00:00
commit
069deb5d7347e47c1ca49b8c32d2c7a271482a19 [patch]
tree
64783f5a399a761d4531fbf0e22a3e00bedb8dd4
parent
5924659bddced2dc42d1e6dccebf9ff78e072041
download
069deb5d7347e47c1ca49b8c32d2c7a271482a19.tar.gz

1.0.0-beta.2



Diff

 Cargo.lock                |  2 +-
 Cargo.toml                |  2 +-
 docker/alpine/Dockerfile  | 26 ++++++++++++++++++++++++++
 docker/scratch/Dockerfile | 18 ++++++++++++++++++
 4 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index eb66093..b9d98d6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -561,7 +561,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "static-web-server"
version = "1.0.0-beta.1"
version = "1.0.0-beta.2"
dependencies = [
 "chrono 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
 "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/Cargo.toml b/Cargo.toml
index bbc1dae..b7be589 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "static-web-server"
version = "1.0.0-beta.1"
version = "1.0.0-beta.2"
authors = ["Jose Quintana <https://git.io/joseluisq>"]

[dependencies]
diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile
new file mode 100644
index 0000000..28419dc
--- /dev/null
+++ b/docker/alpine/Dockerfile
@@ -0,0 +1,26 @@
FROM alpine:3.10

LABEL maintainer="Jose Quintana <joseluisq.net>"

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://git.joseluisq.net/joseluisq/static-web-server" \
    org.opencontainers.image.title="Static Web Server" \
    org.opencontainers.image.description="A blazing fast web server to static files-serving powered by Rust." \
    org.opencontainers.image.version="1.0.0-beta.2" \
    org.opencontainers.image.documentation="https://git.joseluisq.net/joseluisq/static-web-server"
diff --git a/docker/scratch/Dockerfile b/docker/scratch/Dockerfile
new file mode 100644
index 0000000..0078bde
--- /dev/null
+++ b/docker/scratch/Dockerfile
@@ -0,0 +1,18 @@
FROM scratch

LABEL maintainer="Jose Quintana <joseluisq.net>"

COPY ./bin/static-web-server /
COPY ./public /public

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

# Metadata
LABEL org.opencontainers.image.vendor="Jose Quintana" \
    org.opencontainers.image.url="https://git.joseluisq.net/joseluisq/static-web-server" \
    org.opencontainers.image.title="Static Web Server" \
    org.opencontainers.image.description="A blazing fast web server to static files-serving powered by Rust." \
    org.opencontainers.image.version="1.0.0-beta.2" \
    org.opencontainers.image.documentation="https://git.joseluisq.net/joseluisq/static-web-server"