Skip to content

Commit

Permalink
build: optimize and leanify Dockerfile
Browse files Browse the repository at this point in the history
Make the system dependency installation leaner, for a faster docker
build, and make it clean up after itself, for a smaller image in the
end.

Co-authored-by: Samuel Larkin <Samuel.Larkin@cnrc-nrc.gc.ca>
  • Loading branch information
joanise and SamuelLarkin committed Feb 4, 2022
1 parent 36e3c15 commit fb65c8c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ FROM debian:bullseye-slim
ENV APPHOME /opt/readalong-studio
ENV PORT 5000

# Install system dependencies
RUN apt-get update && apt-get install -y \
# Lean, optimized installation of system dependencies
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \
python3 \
python3-pip \
git \
ffmpeg \
vim-nox
vim-nox \
less \
&& apt-get clean \
&& apt-get autoremove \
&& rm -fr /var/lib/apt/lists/*

# Install 3rd party dependencies in their own layer, for faster rebuilds when we
# change ReadAlong-Studio source code
Expand Down

0 comments on commit fb65c8c

Please sign in to comment.