Skip to content

Commit

Permalink
When extracting layers, needs entire layers directory recreated (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Dec 10, 2024
1 parent 3c55b51 commit e33d9d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A simple Gradle plugin to build very simple Spring Boot application Docker image

> Just Docker, Java, and your Spring Boot application
More specifically, this plugin automates the best practices described in the [Spring Boot Container Images](https://docs.spring.io/spring-boot/docs/current/reference/html/container-images.html) documentation by
More specifically, this plugin automates the best practices described in the [Spring Boot Container Images](https://docs.spring.io/spring-boot/reference/packaging/container-images/dockerfiles.html) documentation by
- Hooking into the `bootJar` task of the [Spring Boot Gradle Plugin](https://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins.html#build-tool-plugins.gradle)
- Extracting the application layers
- Generating a Dockerfile
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/me/itzg/simpleimg/ExtractBootLayersTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public abstract class ExtractBootLayersTask extends DefaultTask {
@TaskAction
void extract() {
// Cleanup from previous run, if needed
getProject().delete(getProject().fileTree(getLayersDirectory()));
getProject().delete(getLayersDirectory());
getProject().mkdir(getLayersDirectory());

getExecOperations()
.javaexec(spec -> {
Expand Down

0 comments on commit e33d9d6

Please sign in to comment.