[#24] Second attempt (failed)
This commit is contained in:
parent
d5a513482a
commit
fd7a3e2331
5 changed files with 17 additions and 3 deletions
|
|
@ -8,8 +8,9 @@ ENV RUSTFLAGS "-C target-feature=-crt-static"
|
|||
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 libpq && \
|
||||
{ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly; }
|
||||
RUN apk update && apk add --no-cache openssl-dev curl libpq libgcc musl-dev gcc && \
|
||||
{ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly; } && \
|
||||
rustup target add x86_64-unknown-linux-musl --toolchain nightly
|
||||
|
||||
# Copy source code over to builder
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
|
|
|
|||
|
|
@ -2,5 +2,7 @@ FROM chewingbever/fej-builder:latest
|
|||
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
ENTRYPOINT ["cargo"]
|
||||
COPY ./docker/entrypoint_dev.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["run", "--bin", "server"]
|
||||
|
|
|
|||
4
docker/entrypoint_dev.sh
Executable file
4
docker/entrypoint_dev.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# All this file does is inject the target
|
||||
cargo "$@" --target x86_64-unknown-linux-musl
|
||||
Reference in a new issue