‫And this video, I'm going to create and build Docker image for a user sumichrast service, I will select
‫users MICRA Service, Springwood project and create a new file for it, provide filename, I'll name
‫it Docker File and click on Finish.
‫I have already prepared and Dr. Fasel pasted here, and I will walk you through every single line in
‫this file.
‫You already know we have done it in previous videos and should be familiar to you.
‫So creating a Docker image for users, I said, is based on official Docker image called Open Up.
‫And this is our first line from open gate JDK out in the open.
‫Galpin is based on the popular Alpina Linux project and Alpen Linux project is much smaller than most
‫distribution based images.
‫It's about five megabytes only, and because it is very small, it leads to much smaller images.
‫So I'm going to use it.
‫I will then add the generating java, which is used to start up uses micro servers and I'm renaming
‫it to a simpler name, a user's dash microstructure file.
‫And on the last line, the file will be executed with George R.R. Martin when executing the Georgia
‫command.
‫I also pass in one system property, which we also already talked about in one of the earliest video.
‫And this system property is not necessary for most of Springwood applications, but for those applications
‫that use encryption and generate tokens based this system property to use you them instead of random,
‫makes your application work with random numbers slightly faster.
‫So I'm included in this property as well.
‫The Docker file is very small and simple.
‫I will save it and I'm ready to build it.
‫I will select my project one more time, open properties and will select the location of this project
‫and will bring in a terminal window and will change directly to the location of this project.
‫And I will first rebuild this project using MAVEN.
‫I will run my clean command to clean the target folder first.
‫And now I will run one package command to package this project into executable file and hit enter.
‫Now, when the project is built, I will these files in a target folder.
‫And I want to make sure that the name of generating your profile matches the name in my Docker file.
‫I'll close this.
‫So the name of these file that I'm adding to Docker image should be exactly as the name in the generated
‫target folder.
‫So now I'm ready to build this file.
‫I'll go back to a terminal window and then we'll use Docker build command to build this docker image.
‫I'll use Docker, build those Dastan and I can actually target with the repository name right away so
‫that after they've built a successful I can push this docker image to Docker Hub so I will use and that
‫stock equals and then a repository name.
‫Let me create repository name for it.
‫So I'll go to a browser window.
‫Here's my Docker page and I'll create a new repository and this repository will be for users microspheres.
‫I'll call it Heskey Donge users.
‫The microspheres like this and I'll create.
‫All right, so the repository is created, I will call Pete's name and go back to my terminal window
‫and I will target with the name that first starts with a Docker hop username.
‫My username is Kirkup Off and Forward Slash and the name of the repository.
‫All right, then.
‫Space Task Force, our arm to request intermediate containers to be deleted after the command is done
‫equally through and then space and dot at the end hit enter.
‫And the Docker image is successfully built now we can push it to Docker Hub, I will copy the name of
‫the tag and then we'll use Docker push and paste the name of the tag of this Docker image and hit Enter.
‫Around the push is successful and it should be able to pull this Docker image from Docker Hub and run
‫it on my easier to instance, let's do that.