Skip to content

Commit

Permalink
Set up ccache before adding source files in Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
dstolpmann committed May 19, 2022
1 parent c8ca325 commit 78584af
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ RUN apt-get update \
#######################################
FROM builder AS build

# Add FlowEmu source
ADD CMakeLists.txt /flowemu/CMakeLists.txt
ADD src /flowemu/src

# Setup ccache
# Source: https://stackoverflow.com/a/56833198
ENV CCACHE_DIR /ccache

# Add FlowEmu source
ADD CMakeLists.txt /flowemu/CMakeLists.txt
ADD src /flowemu/src

# Build FlowEmu
RUN --mount=type=cache,target=/ccache \
mkdir -p /flowemu/BUILD \
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile_debug
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ RUN apt-get update \
#######################################
FROM builder AS build

# Add FlowEmu source
ADD CMakeLists.txt /flowemu/CMakeLists.txt
ADD src /flowemu/src

# Setup ccache
# Source: https://stackoverflow.com/a/56833198
ENV CCACHE_DIR /ccache

# Add FlowEmu source
ADD CMakeLists.txt /flowemu/CMakeLists.txt
ADD src /flowemu/src

# Build FlowEmu
RUN --mount=type=cache,target=/ccache \
mkdir -p /flowemu/BUILD \
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile_ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ RUN apt-get update \
#######################################
FROM builder AS build

# Add FlowEmu source
ADD CMakeLists.txt /flowemu/CMakeLists.txt
ADD src /flowemu/src

# Setup ccache
# Source: https://stackoverflow.com/a/56833198
ENV CCACHE_DIR /ccache

# Add FlowEmu source
ADD CMakeLists.txt /flowemu/CMakeLists.txt
ADD src /flowemu/src

# Build FlowEmu
RUN --mount=type=cache,target=/ccache \
mkdir -p /flowemu/BUILD \
Expand Down

0 comments on commit 78584af

Please sign in to comment.