mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-21 20:09:48 -05:00
chore(docker): update Dockerfile about Rust edition
This commit is contained in:
parent
6b3914a54e
commit
b12ff1f579
1 changed files with 4 additions and 0 deletions
|
@ -1,11 +1,15 @@
|
|||
FROM ekidd/rust-musl-builder:latest as builder
|
||||
WORKDIR /home/rust/src
|
||||
COPY Cargo.toml Cargo.toml
|
||||
# https://github.com/emk/rust-musl-builder/issues/130
|
||||
RUN sed -i "s|edition = \"2021\"|edition = \"2018\"|" Cargo.toml
|
||||
RUN mkdir -p src/
|
||||
RUN echo "fn main() {println!(\"failed to build\")}" > src/main.rs
|
||||
RUN cargo build --release
|
||||
RUN rm -f target/release/deps/rustypaste*
|
||||
COPY . .
|
||||
# https://github.com/emk/rust-musl-builder/issues/130
|
||||
RUN sed -i "s|edition = \"2021\"|edition = \"2018\"|" Cargo.toml
|
||||
RUN cargo build --locked --release
|
||||
RUN mkdir -p build-out/
|
||||
RUN cp target/x86_64-unknown-linux-musl/release/rustypaste build-out/
|
||||
|
|
Loading…
Reference in a new issue