FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java-docs-samples/appengine-java11/tasks-handler/Dockerfile at spanner · faube/java-docs-samples · GitHub
faube
/
java-docs-samples
Public
forked from
GoogleCloudPlatform/java-docs-samples
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
java-docs-samples
/
appengine-java11
/
tasks-handler
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (17 loc) · 810 Bytes
Breadcrumbs
java-docs-samples
/
appengine-java11
/
tasks-handler
/
Dockerfile
Copy path
File metadata and controls
23 lines (17 loc) · 810 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
Use the official maven/Java 8 image to create a build artifact.
#
https://hub.docker.com/_/maven
FROM
maven:3.8-jdk-11 as builder
#
Copy local code to the container image.
WORKDIR
/app
COPY
pom.xml .
COPY
src ./src
#
Build a release artifact.
RUN
mvn package -DskipTests
#
Use the Official OpenJDK image for a lean production stage of our multi-stage build.
#
https://hub.docker.com/_/openjdk
#
https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM
openjdk:11-jre-slim
#
Copy the jar to the production image from the builder stage.
COPY
--from=builder /app/target/task-handler-j11-*.jar /task-handler-j11.jar
#
Run the web service on container startup.
CMD
[
"java"
,
"-Djava.security.egd=file:/dev/./urandom"
,
"-Dserver.port=${PORT}"
,
"-jar"
,
"/task-handler-j11.jar"
]
Back
|
FazBrowse Home
|
New Git URL