Blog Archives
Page 1 of 2
1 2

01: Docker Tutorial – compile & run Helloworld.java

Docker, Jenkins, CI/CD, & DEV/OPS have been the buzz words for the last several years. You will be seeing this in more often in the job requirements as well. 21 Docker interview questions & answers | DevOps & CI/CD Interview Q&As

Pre-requisite: Docker is installed on your machine for example:

Mac OS X

Linux systems

Windows10

Find online instructions like: install-docker-on-windows-10

Step 1: Create a folder “

Read more ›



02: Docker Tutorial – Inspect the container

This extends the 01: Docker Tutorial – compile & run Helloworld.java. Keep the container running Docker containers are designed to shut down immediately after initial CMD or ENTRYPOINT command is run. To make it keep running you can change the last line to Delete all stopped containers -a for –all...

Members Only Content
Log In Register Home


03: Docker Tutorial – Java & Maven with a jar file

This extends the 01: Docker Tutorial – compile & run Helloworld.java. Maven pom.xml The run.sh file Create src/main/java folder Maven requires .java files to be in the folder src/main/java folder. So create the folder and move com/myapp/* under that as shown in the above diagram. … Read more ›...

Members Only Content
Log In Register Home


04: Docker Tutorial – mount a host directory in a Docker container

mount a host directory into a Docker container so that the folders & files in the host will show up in the Docker container after building the dockerfile. There are a couple ways you can do this. Option 1: ADD In this approach, any changes made to this directory on...

Members Only Content
Log In Register Home


05: Docker Tutorial – Client & Server on separate containers & networking

In this tutorial, let’s run a Java socket client & a server in two separate Docker containers. Both the client & server are continuously run, and networked by creating a Docker network. MyClient.java MyServer.java Dockerfile.client Note that “myserver” in the CMD is the name we will be giving to the...

Members Only Content
Log In Register Home


Page 1 of 2
1 2

800+ Java Interview Q&As Menu

Top