Just some initial experiments (weather data API) creating and deploying a Spring Boot appliction docker image.
mvn package && java -jar target/gs-spring-boot-0.1.0.jar
docker build -t weather .
docker run -t -p 8080:8080 weather
docker-compose up --build -d
Will also restart and rebuild the image if the .jar has changed
Save image: docker save -o target/my_weather_image weather
Copy saved docker image to "prod" machine: scp target/my_weather_image [email protected]:/weather
Log into "prod" machine, and cd into directory where the copied file is located.
Load the copied image into docker: docker load -i weather`
Start in 'prod' machine: docker run -t -p 80:8080 weather`