[#13] Further overhaul of the project structure for better testing

This commit is contained in:
Jef Roosens 2021-04-08 22:39:04 +02:00
parent e78de73d83
commit 2e73d88ae9
Signed by: Jef Roosens
GPG key ID: B580B976584B5F30
10 changed files with 48 additions and 16 deletions

View file

@ -13,11 +13,13 @@ RUN apk update && apk add --no-cache openssl-dev build-base curl && \
COPY Cargo.toml Cargo.lock ./
COPY src/ ./src/
# Finally, build the project
# Run the tests, don't want no broken docker image
# And then finally, build the project
# Thank the lords that this article exists
# https://users.rust-lang.org/t/sigsegv-with-program-linked-against-openssl-in-an-alpine-container/52172
# TODO add what these flags do & why they work
RUN RUSTFLAGS="-C target-feature=-crt-static" cargo build --release
RUN RUSTFLAGS="-C target-feature=-crt-static" cargo test && \
RUSTFLAGS="-C target-feature=-crt-static" cargo build --release --bin fej
# Now, we create the actual image