mirror of
https://github.com/nicoburns/blessed-rs
synced 2024-11-13 23:47:07 +00:00
Remove duplicated example lines from Dockerfile
This commit is contained in:
parent
d475aeb0cb
commit
a09d1bde0f
1 changed files with 3 additions and 27 deletions
28
Dockerfile
28
Dockerfile
|
@ -1,7 +1,6 @@
|
||||||
|
# Build image
|
||||||
FROM rust:1.59 as builder
|
FROM rust:1.59 as builder
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Run dummy build to build and cache dependencies that only depends on Cargo.toml and Cargo.lock
|
# Run dummy build to build and cache dependencies that only depends on Cargo.toml and Cargo.lock
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
RUN USER=root cargo new blessed-rs
|
RUN USER=root cargo new blessed-rs
|
||||||
|
@ -14,6 +13,7 @@ COPY ./src ./src
|
||||||
COPY ./data ./data
|
COPY ./data ./data
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
|
|
||||||
|
# Run image
|
||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
# RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*
|
# RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*
|
||||||
COPY --from=builder /usr/src/blessed-rs/target/release/blessed-rs /usr/local/bin/blessed-rs
|
COPY --from=builder /usr/src/blessed-rs/target/release/blessed-rs /usr/local/bin/blessed-rs
|
||||||
|
@ -23,27 +23,3 @@ COPY ./static ./static
|
||||||
COPY ./templates ./templates
|
COPY ./templates ./templates
|
||||||
COPY ./data ./data
|
COPY ./data ./data
|
||||||
CMD ["blessed-rs"]
|
CMD ["blessed-rs"]
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /usr/src
|
|
||||||
|
|
||||||
# Create blank project
|
|
||||||
RUN USER=root cargo new umar
|
|
||||||
|
|
||||||
# We want dependencies cached, so copy those first.
|
|
||||||
COPY Cargo.toml Cargo.lock /usr/src/umar/
|
|
||||||
|
|
||||||
WORKDIR /usr/src/umar
|
|
||||||
|
|
||||||
# This is a dummy build to get the dependencies cached.
|
|
||||||
|
|
||||||
|
|
||||||
# Now copy in the rest of the sources
|
|
||||||
COPY src /usr/src/umar/src/
|
|
||||||
|
|
||||||
# This is the actual build.
|
|
||||||
RUN cargo build --release \
|
|
||||||
&& mv target/release/umar /bin \
|
|
||||||
&& rm -rf /usr/src/umar
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
|
|
Loading…
Reference in a new issue