Revert ARM Dockerfile
This commit is contained in:
parent
6b42e97bda
commit
34dfcb2512
@ -3,33 +3,26 @@
|
||||
####################################################################################################
|
||||
FROM rust:alpine AS builder
|
||||
|
||||
RUN apk add --no-cache musl-dev
|
||||
|
||||
RUN adduser --home /nonexistent --no-create-home --disabled-password libreddit
|
||||
RUN apk add --no-cache g++
|
||||
|
||||
WORKDIR /usr/src/libreddit
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN cargo build --target aarch64-unknown-linux-musl --release
|
||||
RUN cargo install --path .
|
||||
|
||||
####################################################################################################
|
||||
## Final image
|
||||
####################################################################################################
|
||||
FROM scratch
|
||||
FROM alpine:latest
|
||||
|
||||
# Import user information from builder.
|
||||
COPY --from=builder /etc/passwd /etc/passwd
|
||||
COPY --from=builder /etc/group /etc/group
|
||||
|
||||
# Import ca-certificates from builder
|
||||
COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
|
||||
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
# Copy our build
|
||||
COPY --from=builder /usr/src/libreddit/target/aarch64-unknown-linux-musl/release/libreddit /usr/local/bin/libreddit
|
||||
COPY --from=builder /usr/local/cargo/bin/libreddit /usr/local/bin/libreddit
|
||||
|
||||
# Use an unprivileged user.
|
||||
RUN adduser --home /nonexistent --no-create-home --disabled-password libreddit
|
||||
USER libreddit
|
||||
|
||||
# Tell Docker to expose port 8080
|
||||
|
Loading…
Reference in New Issue
Block a user