Skip to content

Commit

Permalink
Use buildtool build command in Dockerfile documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
glefloch committed Oct 20, 2020
1 parent 60dd703 commit 2fabd24
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ language:
cmd:
dev: quarkusDev
package: build
package-uberjar: build -Dquarkus.package.type=uber-jar
package-uber-jar: build -Dquarkus.package.type=uber-jar
package-fast-jar: build -Dquarkus.package.type=fast-jar
package-native: build -Dquarkus.package.type=native
package-native-container: build -Dquarkus.package.type=native -Dquarkus.native.container-build=true
build-ci: build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ language:
cmd:
dev: quarkusDev
package: build
package-uberjar: build --Dquarkus.package.type=uber-jar
package-uber-jar: build -Dquarkus.package.type=uber-jar
package-fast-jar: build -Dquarkus.package.type=fast-jat
package-native: build -Dquarkus.package.type=native
package-native-container: build -Dquarkus.package.type=native -Dquarkus.native.container-build=true
build-ci: build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ language:
cmd:
dev: compile quarkus:dev
package: package
package-uberjar: package -Dquarkus.package.type=uber-jar
package-uber-jar: package -Dquarkus.package.type=uber-jar
package-fast-jar: package -Dquarkus.package.type=fast-jar
package-native: package -Pnative
package-native-container: package -Pnative -Dquarkus.native.container-build=true
build-ci: verify -B
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Be aware that it’s not an _über-jar_ as the dependencies are copied into the

If you want to build an _über-jar_, execute the following command:
```shell script
{buildtool.cli} {buildtool.cmd.package-uberjar}
{buildtool.cli} {buildtool.cmd.package-uber-jar}
```

The application is now runnable using `java -jar {buildtool.build-dir}/{project.artifact-id}-{project.version}-runner.jar`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Before building the container image run:
#
# {#insert quarkusbuild} mvn package {/}
# {#insert quarkusbuild /}
#
# Then, build the image with:
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#include Dockerfile-layout type='fast-jar'}
{#quarkusbuild}mvn package -Dquarkus.package.type=fast-jar{/quarkusbuild}
{#quarkusbuild}{buildtool.cli} {buildtool.cmd.package-fast-jar}{/quarkusbuild}
{#image}{dockerfile.fast-jar.from} {/image}
{#args}
ARG JAVA_PACKAGE={dockerfile.fast-jar.java-package}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{#include Dockerfile-layout type='jvm'}
{#image}{dockerfile.jvm.from} {/}
{#quarkusbuild}{buildtool.cli} {buildtool.cmd.package}{/quarkusbuild}
{#image}{dockerfile.jvm.from} {/image}
{#args}
ARG JAVA_PACKAGE={dockerfile.jvm.java-package}
ARG RUN_JAVA_VERSION={dockerfile.jvm.run-java-version}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Before building the container image run:
#
# mvn package -Pnative -Dquarkus.native.container-build=true
# {buildtool.cli} {buildtool.cmd.package-native}
#
# Then, build the image with:
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,11 @@ private void checkNoExample(Path projectDir) {
private void checkDockerfiles(Path projectDir) {
assertThat(projectDir.resolve(".dockerignore")).exists();
assertThat(projectDir.resolve("src/main/docker/Dockerfile.jvm")).exists()
.satisfies(checkContains("mvn package"))
.satisfies(checkContains("docker build -f src/main/docker/Dockerfile.jvm"))
.satisfies(checkContains("registry.access.redhat.com/ubi8/ubi-minimal:8.1"))
.satisfies(checkContains("ARG JAVA_PACKAGE=java-11-openjdk-headless"))
.satisfies(checkContains("ENTRYPOINT [ \"/deployments/run-java.sh\" ]"));
assertThat(projectDir.resolve("src/main/docker/Dockerfile.fast-jar")).exists()
.satisfies(checkContains("mvn package -Dquarkus.package.type=fast-jar"))
.satisfies(checkContains("docker build -f src/main/docker/Dockerfile.fast-jar"))
.satisfies(checkContains("registry.access.redhat.com/ubi8/ubi-minimal:8.1"))
.satisfies(checkContains("ARG JAVA_PACKAGE=java-11-openjdk-headless"))
Expand Down

0 comments on commit 2fabd24

Please sign in to comment.