Day-17 of DevOps Challenge: Docker Project Part-2 for DevOps Engineers
Docker Volume
Docker volumes are used to manage data in Docker containers. They provide a way to persist data generated and used by Docker containers. Here's an overview of how to use Docker volumes:
Creating and Using Volumes
docker volume create my_volume
Remove a Volume:
docker volume rm my_volume
Using Volumes in Docker Containers
docker run -d -v my_volume:/path/in/container my_image
Managing Volumes with Docker Compose
Docker Network
Docker networks allow containers to communicate with each other and with the outside world. Here’s an overview of how to create and manage Docker networks:
Creating and Using Docker Networks
docker network create my_network
Inspecting a Network:
docker network inspect my_network
Removing a Network:
docker network rm my_network
Connecting Containers to a Network
docker run -d --name my_container --network my_network my_image
Managing Networks with Docker Compose
I have performed some tasks that might help everyone on docker project Part-2 with help of docker compose
The resume-scoring-app
project consists of a backend implemented in Java using Spring Boot and a frontend with HTML and JavaScript. The backend includes controllers, services, and utility classes to handle resume scoring. The project uses Maven for build management and Docker for containerization. The docker-compose.yml
file orchestrates the multi-container setup for both frontend and backend services.
Root Directory
README.md: Likely contains documentation for the project.
backend: Directory containing the backend code and related configurations.
frontend: Directory containing the frontend code and related configurations.
docker-compose.yml: Docker Compose file for orchestrating multi-container Docker applications.
Backend Directory
DockerFile, docker2, docker4: Docker-related files, likely different versions or configurations for building the backend Docker image.
pom.xml: Maven configuration file for managing dependencies and building the backend project.
src/main/java
com/example/resumescoring
ResumeScoringApplication.java: The main application class for Spring Boot.
controller
ResumeController.java: Controller class for handling HTTP requests related to resume scoring.
ResumeController_old: Likely an older version of the ResumeController.java
.
service
ResumeService.java: Service class containing the business logic for resume scoring.
util
ResumeParser.java: Utility class for parsing resumes.
src/main/resources
application.properties: Configuration file for the Spring Boot application.
target
classes: Contains compiled classes and resources.
com/example/resumescoring
ResumeScoringApplication.class
controller/ResumeController.class
service/ResumeService.class
util/ResumeParser.class
maven-archiver: Contains build-related metadata.
maven-status: Contains Maven build status information.
maven-compiler-plugin
compile
default-compile
createdFiles.lst
inputFiles.lst
resume-scoring-0.0.1-SNAPSHOT.jar: The packaged JAR file of the backend application.
resume-scoring-0.0.1-SNAPSHOT.jar.original: Original JAR file before modifications.
Frontend Directory
Dockerfile: Docker configuration file for building the frontend Docker image.
app.js: Main JavaScript file for the frontend application.
index.html: Main HTML file for the frontend application.
Subscribe to my newsletter
Read articles from Akash Rastogi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by