-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
68 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...main/resources/codestarts/quarkus/tooling/dockerfiles/base/Dockerfile-native.include.qute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#### | ||
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. | ||
{#if type == 'native-micro'} | ||
# It uses a micro base image, tuned for Quarkus native executables. | ||
# It reduces the size of the resulting container image. | ||
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image. | ||
{/if} | ||
# | ||
# Before building the container image run: | ||
# | ||
# {buildtool.cli} {buildtool.cmd.package-native} | ||
# | ||
# Then, build the image with: | ||
# | ||
# docker build -f src/main/docker/Dockerfile.{type} -t quarkus/{project.artifact-id} . | ||
# | ||
# Then run the container using: | ||
# | ||
# docker run -i --rm -p 8080:8080 quarkus/{project.artifact-id} | ||
# | ||
### | ||
FROM {image} | ||
WORKDIR /work/ | ||
RUN chown 1001 /work \ | ||
&& chmod "g+rwX" /work \ | ||
&& chown 1001:root /work | ||
COPY --chown=1001:root {buildtool.build-dir}/*-runner /work/application | ||
|
||
EXPOSE 8080 | ||
USER 1001 | ||
|
||
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] |
15 changes: 4 additions & 11 deletions
15
...urces/codestarts/quarkus/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.jvm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
{#include Dockerfile-layout type='jvm'} | ||
{#quarkusbuild}{buildtool.cli} {buildtool.cmd.package}{/quarkusbuild} | ||
{#copy} | ||
# We make four distinct layers so if there are application changes the library layers can be re-used | ||
COPY --chown=185 {buildtool.build-dir}/quarkus-app/lib/ /deployments/lib/ | ||
COPY --chown=185 {buildtool.build-dir}/quarkus-app/*.jar /deployments/ | ||
COPY --chown=185 {buildtool.build-dir}/quarkus-app/app/ /deployments/app/ | ||
COPY --chown=185 {buildtool.build-dir}/quarkus-app/quarkus/ /deployments/quarkus/ | ||
{/copy} | ||
{/include} | ||
|
||
{#include Dockerfile-jar | ||
type='jvm' | ||
image=dockerfile.jvm.from.format(java.version) | ||
cmd=buildtool.cmd.package /} |
11 changes: 4 additions & 7 deletions
11
...odestarts/quarkus/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.legacy-jar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
{#include Dockerfile-layout type='legacy-jar'} | ||
{#quarkusbuild}{buildtool.cli} {buildtool.cmd.package-legacy-jar}{/quarkusbuild} | ||
{#copy} | ||
COPY {buildtool.build-dir}/lib/* /deployments/lib/ | ||
COPY {buildtool.build-dir}/*-runner.jar /deployments/quarkus-run.jar | ||
{/copy} | ||
{/include} | ||
{#include Dockerfile-jar | ||
type='legacy-jar' | ||
image=dockerfile.jvm.from.format(java.version) | ||
cmd=buildtool.cmd.package-legacy-jar /} |
28 changes: 1 addition & 27 deletions
28
...es/codestarts/quarkus/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1 @@ | ||
#### | ||
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. | ||
# | ||
# Before building the container image run: | ||
# | ||
# {buildtool.cli} {buildtool.cmd.package-native} | ||
# | ||
# Then, build the image with: | ||
# | ||
# docker build -f src/main/docker/Dockerfile.native -t quarkus/{project.artifact-id} . | ||
# | ||
# Then run the container using: | ||
# | ||
# docker run -i --rm -p 8080:8080 quarkus/{project.artifact-id} | ||
# | ||
### | ||
FROM {dockerfile.native.from} | ||
WORKDIR /work/ | ||
RUN chown 1001 /work \ | ||
&& chmod "g+rwX" /work \ | ||
&& chown 1001:root /work | ||
COPY --chown=1001:root {buildtool.build-dir}/*-runner /work/application | ||
|
||
EXPOSE 8080 | ||
USER 1001 | ||
|
||
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] | ||
{#include Dockerfile-native type='native' image=dockerfile.native.from /} |
31 changes: 1 addition & 30 deletions
31
...estarts/quarkus/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.native-micro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1 @@ | ||
#### | ||
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. | ||
# It uses a micro base image, tuned for Quarkus native executables. | ||
# It reduces the size of the resulting container image. | ||
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image. | ||
# | ||
# Before building the container image run: | ||
# | ||
# {buildtool.cli} {buildtool.cmd.package-native} | ||
# | ||
# Then, build the image with: | ||
# | ||
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/{project.artifact-id} . | ||
# | ||
# Then run the container using: | ||
# | ||
# docker run -i --rm -p 8080:8080 quarkus/{project.artifact-id} | ||
# | ||
### | ||
FROM {dockerfile.native-micro.from} | ||
WORKDIR /work/ | ||
RUN chown 1001 /work \ | ||
&& chmod "g+rwX" /work \ | ||
&& chown 1001:root /work | ||
COPY --chown=1001:root {buildtool.build-dir}/*-runner /work/application | ||
|
||
EXPOSE 8080 | ||
USER 1001 | ||
|
||
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] | ||
{#include Dockerfile-native type='native-micro' image=dockerfile.native-micro.from /} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters