[#24] First try at compiling diesel in container (DOESN'T WORK)

This commit is contained in:
Jef Roosens 2021-04-16 20:39:09 +02:00
parent 14321db316
commit d5a513482a
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
4 changed files with 98 additions and 3 deletions

View file

@ -4,13 +4,11 @@ FROM alpine:latest AS builder
ENV PATH "$PATH:/root/.cargo/bin"
# Needed for proper compiling of openssl-dev
ENV RUSTFLAGS "-C target-feature=-crt-static"
# Otherwise, the debug build can't be used from the container
ENV ROCKET_ADDRESS "0.0.0.0"
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 && \
RUN apk update && apk add --no-cache openssl-dev build-base curl libpq && \
{ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly; }
# Copy source code over to builder