fej/docker/Dockerfile.builder

15 lines
491 B
Docker
Raw Normal View History

# We use a multi-stage build to end up with a very small final image
FROM alpine:latest AS builder
ENV PATH "$PATH:/root/.cargo/bin"
WORKDIR /usr/src/app
# Install build dependencies, rustup & rust's nightly build & toolchain
RUN apk update && apk add --no-cache openssl-dev build-base curl && \
{ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly; }
# Copy source code over to builder
COPY Cargo.toml Cargo.lock ./
COPY src/ ./src/