Skip to content

Commit

Permalink
Merge pull request #76 from jacobwgillespie/main
Browse files Browse the repository at this point in the history
Move `apt-get` to top of Dockerfile for better caching
  • Loading branch information
Czechh authored Aug 23, 2023
2 parents 91a1caa + 6eb1d62 commit bc65668
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM rust:1.68-bullseye as build

# had to add this for open-ssl
RUN apt-get update -y && \
apt-get install -y pkg-config make g++ libssl-dev ca-certificates && \
rustup target add x86_64-unknown-linux-gnu

RUN USER=root cargo new --bin motorhead
WORKDIR /motorhead

COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml

# had to add this for open-ssl
RUN apt-get update -y && \
apt-get install -y pkg-config make g++ libssl-dev ca-certificates && \
rustup target add x86_64-unknown-linux-gnu

# cache dependencies
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN cargo build --release
Expand Down

0 comments on commit bc65668

Please sign in to comment.