Skip to content

Commit

Permalink
Merge pull request ariel-alcocer-tx#1 from ariel-alcocer-tx/iteration1
Browse files Browse the repository at this point in the history
Iteration 1: Run a single Jar file
  • Loading branch information
ariel-alcocer-tx authored May 18, 2018
2 parents 2687358 + c336b59 commit c29601b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
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
29 changes: 29 additions & 0 deletions Readme.md
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
```

0 comments on commit c29601b

Please sign in to comment.