mirror of
https://github.com/rjNemo/docker_examples
synced 2026-06-06 02:26:45 +00:00
21 lines
278 B
Docker
21 lines
278 B
Docker
FROM rust:alpine as builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . ./
|
|
|
|
RUN apk -U upgrade --no-cache && \
|
|
apk add --no-cache musl-dev
|
|
|
|
RUN cargo build --release
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
RUN apk -U upgrade --no-cache
|
|
|
|
COPY --from=builder app/target/release/example .
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ./example
|