28 lines
821 B
Plaintext
28 lines
821 B
Plaintext
FROM alpine AS cache
|
|
RUN apk add -U --no-cache ca-certificates
|
|
|
|
FROM scratch as base
|
|
COPY ./static/ /app/static
|
|
COPY ./migrations /app/migrations
|
|
COPY ./db /app/db
|
|
WORKDIR /app/
|
|
|
|
FROM base as amd64
|
|
COPY --from=cache /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY ./target/x86_64-unknown-linux-musl/release/podfetch /app/podfetch
|
|
|
|
FROM base as armv7
|
|
COPY --from=cache /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY ./target/armv7-unknown-linux-musleabihf/release/podfetch /app/podfetch
|
|
|
|
FROM base as arm64
|
|
COPY --from=cache /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY ./target/aarch64-unknown-linux-musl/release/podfetch /app/podfetch
|
|
|
|
FROM ${TARGETARCH}${TARGETVARIANT} as final
|
|
|
|
LABEL org.opencontainers.image.source="https://github.com/SamTV12345/PodFetch"
|
|
|
|
|
|
EXPOSE 8000
|
|
CMD ["./podfetch"] |