Clean dockerfile layer in Rust example

Following the [best practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) we should encourage people to remove the cache after installing dependencies.
This commit is contained in:
Jérémie Drouet 2020-04-01 18:49:17 +02:00 committed by Tianon Gravi
parent 22cf37aaf3
commit 99d42f9353
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ COPY . .
RUN cargo install --path .
FROM debian:buster-slim
RUN apt-get update && apt-get install -y extra-runtime-dependencies
RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/myapp /usr/local/bin/myapp
CMD ["myapp"]
```