2022-06-11 23:44:44 +02:00
|
|
|
from rust:1.61.0-alpine as builder
|
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN cargo init
|
|
|
|
COPY Cargo.* /app/
|
|
|
|
RUN cargo fetch
|
|
|
|
|
|
|
|
RUN apk add --no-cache musl-dev
|
|
|
|
RUN cargo build --release
|
|
|
|
|
|
|
|
COPY src /app/src
|
|
|
|
COPY templates /app/templates
|
|
|
|
|
|
|
|
RUN cargo build --release
|
|
|
|
|
|
|
|
from alpine as runtime
|
|
|
|
|
|
|
|
COPY --from=builder /app/target/release/tickets /app/tickets
|
|
|
|
|
2022-06-12 00:25:38 +02:00
|
|
|
COPY static /app/static
|
|
|
|
|
2022-06-11 23:44:44 +02:00
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
CMD ["/app/tickets"]
|