Skip to content

Commit 9cd3485

Browse files
committed
Install dependencies before copying in code
Improve layer caching by installing dependencies before copying in the code. That way, dependencies don't have to be reinstalled just for a code change.
1 parent a72e50b commit 9cd3485

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM gcc:bullseye as build
22

3-
WORKDIR /usr/local/src
4-
COPY . /usr/local/src/hdt-cpp/
5-
63
# Install dependencies
74
RUN apt-get update && apt-get -y install \
85
build-essential \
@@ -22,6 +19,9 @@ RUN wget https://github.com/drobilla/serd/archive/v0.28.0.tar.gz \
2219
&& cd serd-* \
2320
&& ./waf configure && ./waf && ./waf install
2421

22+
WORKDIR /usr/local/src/hdt-cpp
23+
COPY . .
24+
2525
# Install HDT tools
2626
RUN cd hdt-cpp && ./autogen.sh && ./configure && make -j2
2727

0 commit comments

Comments
 (0)