forked from ariel-alcocer-tx/minimum
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ariel-alcocer-tx#1 from ariel-alcocer-tx/iteration1
Iteration 1: Run a single Jar file
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Dockerfile | ||
|
||
# Base Alpine Linux based image with OpenJDK JRE only | ||
FROM openjdk:8-jre-alpine | ||
|
||
MAINTAINER Ariel Alcocer <[email protected]> | ||
|
||
WORKDIR / | ||
|
||
# Copyng generated Jar file to root directory | ||
ADD target/minimum-*.jar minimum.jar | ||
|
||
# Running Jar file | ||
CMD java -jar minimum.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#Minimum | ||
|
||
### Iteration 1: Run a single Jar file | ||
Including steps for building and running a docker image for a Java Application that is maven based. | ||
* Build the docker image using Dockerfile configuration | ||
``` dockerfile | ||
# Dockerfile | ||
|
||
# Base Alpine Linux based image with OpenJDK JRE only | ||
FROM openjdk:8-jre-alpine | ||
|
||
MAINTAINER Ariel Alcocer <[email protected]> | ||
|
||
WORKDIR / | ||
|
||
# Copyng generated Jar file to root directory | ||
ADD target/minimum-*.jar minimum.jar | ||
|
||
# Running Jar file | ||
CMD java -jar minimum.jar | ||
``` | ||
* Build the docker image | ||
``` | ||
docker build -t tn/minimum:latest . | ||
``` | ||
* Run the created docker image | ||
``` | ||
docker run tn/minimum:latest | ||
``` |