Skip to content

Commit

Permalink
Add dependency caching
Browse files Browse the repository at this point in the history
  • Loading branch information
libmartinito committed Oct 9, 2023
1 parent 11616b4 commit 284753f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion dockerfiles/java-1.8.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,14 @@ RUN apk add curl
# Download docker-explorer
ARG docker_explorer_version=v18
RUN curl --fail -Lo /usr/local/bin/docker-explorer https://github.com/codecrafters-io/docker-explorer/releases/download/${docker_explorer_version}/${docker_explorer_version}_linux_amd64
RUN chmod +x /usr/local/bin/docker-explorer
RUN chmod +x /usr/local/bin/docker-explorer

# Download dependencies
RUN mv /app/target /app-cached

# Cache dependencies
RUN mv /app/target /app-cached

# Pre-compile steps
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && mvn -B package -Ddir=/tmp/codecrafters-docker-target && sed -i 's/^\(mvn .*\)/#\1/' ./your_docker.sh" > /codecrafters-precompile.sh
RUN chmod +x /codecrafters-precompile.sh

0 comments on commit 284753f

Please sign in to comment.