File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ # This file is copied from: https://github.com/k4yt3x/simple-http-server/blob/master/Dockerfile
2+ # LICENS: BSD 2-Clause "Simplified" License
3+ # please see https://github.com/k4yt3x/simple-http-server/blob/master/LICENSE for more details
4+
5+ FROM rust:1.61-alpine3.15 as builder
6+ # branch name or tag
7+ ARG BRANCH
8+ RUN apk add --no-cache --virtual .build-deps git make musl-dev openssl-dev perl pkgconfig \
9+ && git clone -b $BRANCH https://github.com/TheWaWaR/simple-http-server.git /simple-http-server \
10+ && RUSTFLAGS='-C link-arg=-s' cargo build --release --target aarch64-unknown-linux-musl --manifest-path=/simple-http-server/Cargo.toml
11+
12+ FROM gcr.io/distroless/static:nonroot
13+ LABEL maintainer="thewawar <thewawar@gmail.com>" \
14+ org.opencontainers.image.source="https://github.com/TheWaWaR/simple-http-server" \
15+ org.opencontainers.image.description="A minimal distroless container image for TheWaWaR/simple-http-server"
16+ COPY --from=builder \
17+ /simple-http-server/target/aarch64-unknown-linux-musl/release/simple-http-server \
18+ /usr/local/bin/simple-http-server
19+ USER nonroot:nonroot
20+ WORKDIR /var/www/html
21+ ENTRYPOINT ["/usr/local/bin/simple-http-server"]
Original file line number Diff line number Diff line change 1+ # This file is copied from: https://github.com/k4yt3x/simple-http-server/blob/master/Dockerfile
2+ # LICENS: BSD 2-Clause "Simplified" License
3+ # please see https://github.com/k4yt3x/simple-http-server/blob/master/LICENSE for more details
4+
5+ FROM rust:1.61-alpine3.15 as builder
6+ # branch name or tag
7+ ARG BRANCH
8+ RUN apk add --no-cache --virtual .build-deps git make musl-dev openssl-dev perl pkgconfig \
9+ && git clone -b $BRANCH https://github.com/TheWaWaR/simple-http-server.git /simple-http-server \
10+ && RUSTFLAGS='-C link-arg=-s' cargo build --release --target x86_64-unknown-linux-musl --manifest-path=/simple-http-server/Cargo.toml
11+
12+ FROM gcr.io/distroless/static:nonroot
13+ LABEL maintainer="thewawar <thewawar@gmail.com>" \
14+ org.opencontainers.image.source="https://github.com/TheWaWaR/simple-http-server" \
15+ org.opencontainers.image.description="A minimal distroless container image for TheWaWaR/simple-http-server"
16+ COPY --from=builder \
17+ /simple-http-server/target/x86_64-unknown-linux-musl/release/simple-http-server \
18+ /usr/local/bin/simple-http-server
19+ USER nonroot:nonroot
20+ WORKDIR /var/www/html
21+ ENTRYPOINT ["/usr/local/bin/simple-http-server"]
You can’t perform that action at this time.
0 commit comments