Skip to content

Commit

Permalink
fix: install protobuf-compiler before using it in Dockerfile (#76)
Browse files Browse the repository at this point in the history
* install protobuf-compiler before using it in Dockerfile

* Use single line docker RUN for update/install

references:
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

https://stackoverflow.com/questions/56329971/putting-run-commands-in-one-line-make-build-faster

* Update Dockerfile to clean out apt lists after install

Co-authored-by: Sean Lynch <[email protected]>

---------

Co-authored-by: Sean Lynch <[email protected]>
  • Loading branch information
hderms and swlynch99 authored Feb 16, 2023
1 parent e7b42ea commit 4a191ac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
FROM rust:latest as cargo-build

COPY . .
RUN apt-get update
RUN apt-get install -y cmake
RUN apt-get install -y clang
RUN apt-get update && apt-get install -y \
cmake \
clang \
protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
RUN cargo vendor > .cargo/config

RUN cargo build --release -p momento_proxy
Expand Down

0 comments on commit 4a191ac

Please sign in to comment.