Skip to content

Commit

Permalink
build: debian:bookworm-slim for native and improve commandline packag…
Browse files Browse the repository at this point in the history
…ing (#5)

Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun authored Jan 3, 2023
1 parent 5da393c commit 71aa438
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ COPY . .
RUN ./mvnw -B -ntp clean package -DskipTests

FROM eclipse-temurin:17-jre
COPY --from=build /build/distribution/commandline/target/commandline-1.0.0-SNAPSHOT.jar /bin/hawkeye
COPY --from=build /build/distribution/commandline/target/hawkeye.jar /bin/hawkeye
ENTRYPOINT ["/bin/hawkeye"]
2 changes: 1 addition & 1 deletion Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ WORKDIR /build
COPY . .
RUN ./mvnw -B -ntp clean package -DskipTests -Pnative -DonlyNativeDistro

FROM ubuntu:jammy
FROM debian:bookworm-slim
COPY --from=build /build/distribution/native/target/hawkeye-native /bin/
ENTRYPOINT ["/bin/hawkeye-native"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Simple license header checker and formatter, in multiple distribution forms.
./mvnw clean install -DskipTests

# Run
./distribution/commandline/target/hawkeye-<version>-bin/hawkeye-<version>/hawkeye
./distribution/commandline/target/hawkeye.jar
```

### Native Image
Expand Down
3 changes: 3 additions & 0 deletions distribution/commandline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<finalName>hawkeye</finalName>
</configuration>
</execution>
</executions>
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion distribution/commandline/src/assemble/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</formats>
<files>
<file>
<source>${project.build.directory}/commandline-${project.version}.jar</source>
<source>${project.build.directory}/hawkeye.jar</source>
<destName>hawkeye</destName>
<outputDirectory>.</outputDirectory>
<fileMode>755</fileMode>
Expand Down

0 comments on commit 71aa438

Please sign in to comment.