You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
431 B
Docker
25 lines
431 B
Docker
2 years ago
|
# ---- Base ----
|
||
|
FROM alpine:3 AS base
|
||
|
WORKDIR /app
|
||
|
|
||
|
|
||
|
# ---- Build ----
|
||
|
FROM rust:alpine AS build
|
||
|
WORKDIR /build
|
||
|
# Install packages
|
||
|
RUN apk add --no-cache make libc-dev build-base
|
||
|
# Copy sources
|
||
|
ADD .build/repository/ .
|
||
|
# Update dependencies
|
||
|
RUN cargo update
|
||
|
# Compile
|
||
|
RUN TARGET="release" make
|
||
|
|
||
|
|
||
|
# ---- Release ----
|
||
|
FROM base AS release
|
||
|
# Copy build-target
|
||
|
COPY --from=build /build/target/release/bandwhich .
|
||
|
|
||
|
CMD ["./bandwhich"]
|