Blog Archives

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

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...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


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...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


03: Java gRPC with flatbuffers on Docker & Maven tutorial step by step

This extends Java gRPC with flatbuffers & Maven tutorial step by step.

The only difference in this tutorial is to use flatc via a Docker image that has flatbuffers.

This tutorial uses the image neomantra/flatbuffers from Docker hub.

…

Read more ›



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...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


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 “ … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


06: Docker Tutorial – Spring boot application

Step 1: Go to “https://start.spring.io/“, and create a skeletal Spring project. Type “web” in the “search dependencies to add” and fill the “group” and “artifact” fields as shown below. Step 2: Click on the “+” button to add and then on the “Generate Project”, … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


07: Docker Tutorial – Spring boot with Docker maven plugin

This tutorial extends the 06: Docker Tutorial – Spring boot application. In the previous tutorial the Dockerfile has the jar filename & the version. Every time the version changes the Dockerfile has to be changed. Also, we have to manually type the Docker commands by opening a terminal. … Read...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


08: Docker Tutorial – client & server with docker-compose.yml

Q1. What is docker compose? A1. Docker compose allows us to configure and start multiple containers within the same host. This is handy if you don’t want to start each container separately. Q2. How does docker compose differ from Docker swarm? … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data