Skip to content

Commit

Permalink
Slim down the docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
not-wlan committed Oct 19, 2020
1 parent 5f17d66 commit 87d8c69
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,17 @@ COPY ./Cargo.toml .
COPY ./Cargo.lock .
COPY ./src/ /app/src/

RUN cargo update -p pdb_wrapper && cargo install --path .
RUN cargo update -p pdb_wrapper && cargo install --path . --target-dir /app/bin

RUN ls -alh /app/bin/release

FROM debian:buster-slim
WORKDIR /app
RUN apt-get update && apt-get install -y curl wget gnupg
# Add the LLVM public key to verify the repos
RUN bash -c "wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -"
# Add the LLVM repos
RUN printf "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main\ndeb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main" > /etc/apt/sources.list.d/backports.list
# Install dependencies
RUN apt-get update && apt-get install -y libllvm10 llvm-10-runtime libclang1-10 gcc-multilib
COPY --from=0 /app/bin/release/bao /usr/bin/

0 comments on commit 87d8c69

Please sign in to comment.