Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 1.81 KB

README.md

File metadata and controls

75 lines (55 loc) · 1.81 KB

docker-java-base-images

Docker Repository on Quay Docker Repository on Quay

Type

docker pull quay.io/peterszatmary/java_build_base
docker pull quay.io/peterszatmary/java_run_base

Dockerfile-s for java world.

  • build-image/Dockerfile : image for building java apps (Oracle java 8 + maven 3.6.0)
  • run-image/Dockerfile : image for running java apps (Oracle java 8 + prepared for different environments)

Notes

  • user psz so no root execution
  • based on alpine so images are small
  • prepared for different environments thanks to build-args
  • run-image/Dockerfile uses another git project app_props

Result

  • one base build image for java applications
  • 4 base images for running applications different because of environment.

How to use images in Dockerfile or pull them

Result

Build base image

$ cd build-image
$ sh build.sh 1.0v
$ sh run.sh 1.0v

Run base image for dev env

$ cd run-image
$ sh build.sh dev 1.0v
$ sh run.sh dev 1.0v

Run base image for sit env

$ cd run-image
$ sh build.sh sit 1.0v
$ sh run.sh sit 1.0v

Run base image for cit env

$ cd run-image
$ sh build.sh cit 1.0v
$ sh run.sh cit 1.0v

Run base image for prod env

$ cd run-image
$ sh build.sh prod 1.0v
$ sh run.sh prod 1.0v