forked from Maurice/pastabble
22 lines
558 B
Docker
22 lines
558 B
Docker
FROM rust:alpine3.18 AS builder
|
|
WORKDIR /build
|
|
|
|
RUN apk add --no-cache musl-dev
|
|
COPY . ./
|
|
RUN apk --print-arch
|
|
RUN case "$(apk --print-arch)" in \
|
|
x86_64) cargo build --target x86_64-unknown-linux-musl --release; \
|
|
mv ./target/x86_64-unknown-linux-musl /release ;; \
|
|
aarch64) cargo build --target aarch64-unknown-linux-musl --release; \
|
|
mv ./target/aarch64-unknown-linux-musl /release ;; \
|
|
esac
|
|
|
|
FROM alpine:edge
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /release/* /app
|
|
COPY ./about.html /app/about.html
|
|
|
|
EXPOSE 8080
|
|
CMD [ "./pastabble" ]
|