Docker in AWS
Docker in AWS
Create one simple hello world program using spring boot rest
You can first test whether the application is running on the
localhost
Mention the jar file you want to be created when you package
pom.xml
Dockerfile
Mention these entries in the Dockerfile
FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java", "-jar", "/app.jar"]
The above command creates the docker image which can be run
using docker run command
You can use docker images to find the docker images
Output:
>> docker ps
Steps:
Output: