Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CAPS for build args in Dockerfile example #19029

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -41,8 +41,8 @@ For example, using a `Dockerfile` you could express it in this form:
----
FROM openjdk:8-jdk-alpine AS builder
WORKDIR target/dependency
ARG appjar
COPY ${appjar} app.jar
ARG APPJAR=target/*.jar
COPY ${APPJAR} app.jar
RUN jar -xf ./app.jar

FROM openjdk:8-jre-alpine
Expand All @@ -54,15 +54,14 @@ For example, using a `Dockerfile` you could express it in this form:
ENTRYPOINT ["java","-cp","app:app/lib/*","com.example.MyApplication"]
----

Assuming the above `Dockerfile` is the current directory, your docker image can be built specifying the path to your application jar, as show in the following example:
Assuming the above `Dockerfile` is the current directory, your docker image can be built with `docker build .`, or optionally specifying the path to your application jar, as show in the following example:

[indent=0]
----
docker build --build-arg appjar=path/to/myapp.jar .
----



[[cloud-deployment]]
== Deploying to the Cloud
Spring Boot's executable jars are ready-made for most popular cloud PaaS (Platform-as-a-Service) providers.
Expand Down