BLOG-90 Fix backend docker build error (#123)
All checks were successful
Frontend CI / build (push) Successful in 1m11s
All checks were successful
Frontend CI / build (push) Successful in 1m11s
### Description - Using `alpine` for build environment. <https://g.co/gemini/share/ad84493a13dd> ### Package Changes _No response_ ### Screenshots _No response_ ### Reference Resolves #122. ### Checklist - [x] A milestone is set - [x] The related issuse has been linked to this branch Reviewed-on: #123 Co-authored-by: SquidSpirit <squid@squidspirit.com> Co-committed-by: SquidSpirit <squid@squidspirit.com>
This commit is contained in:
parent
08c5262df6
commit
a9df43943e
@ -1,15 +1,14 @@
|
|||||||
FROM rust:1-slim AS base
|
FROM rust:1-alpine AS base
|
||||||
RUN apt update -qq && apt install -y -qq --no-install-recommends musl-tools
|
RUN apk add --no-cache build-base openssl-dev openssl-libs-static
|
||||||
RUN rustup target add x86_64-unknown-linux-musl
|
|
||||||
|
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN cargo build --release --target x86_64-unknown-linux-musl
|
RUN cargo build --release
|
||||||
|
|
||||||
FROM alpine:latest AS runner
|
FROM alpine:latest AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/server .
|
COPY --from=builder /app/target/release/server .
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
VOLUME ["/app/static"]
|
VOLUME ["/app/static"]
|
||||||
ENV RUST_LOG=info
|
ENV RUST_LOG=info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user