top of page

Docker-assignments

Docker-Day-1-Free-trail

### Project Scenario: Installing Docker and Validating Basic Commands

  1. Install Docker using `yum`:

  2. Start the Docker service:

  3. Enable Docker to start on boot:

  4. Check available Docker images:

  5. Run a "Hello World" container:

  6. Explain from where the image is downloaded:

  7. List running containers:

  8. List all containers (including stopped ones):


 

### Project Scenario: to further explore Docker by running a container, assigning a name, and validating each step:

  1. Run "Hello World" container again

  2. Create a new container with an assigned name

  3. Check running containers

  4. Check all containers (including stopped ones)


 

### Project Scenario: to explore Docker image search, naming conventions, and setting up a Docker Hub repository:

  1. Search for Docker images using the `docker search` command

  2. Explain Docker image naming convention

  3. Create a Docker Hub repository

 

### Project Scenario: to pull an Nginx image, tag it, log in to Docker Hub, push the image, and verify its presence on Docker Hub

  1. Pull the Nginx image from Docker Hub

  2. Tag the Nginx image with `test_tag`

  3. Log in to Docker Hub

  4. Push the tagged Nginx image to Docker Hub

  5. Check the image on Docker Hub

 
  1. ##- Docker Hub Credentials

  2. /root/.docker/config.json

  3. Common Issues and Fixes with `/root/.docker/config.json

Docker-Day-2

### Project Scenario: Pushing Docker Image to AWS ECR from an EC2 Instance

  1. Create a Repository in AWS ECR

  2. Create Security Key (Access Key and Secret Key)

  3. Configure AWS CLI on the EC2 Instance

  4. Authenticate the Docker CLI to AWS ECR

  5. Tag the Docker Image

  6. Push the Docker Image to AWS ECR

  7. Validate the Image on AWS ECR


 

### Project Scenario: Managing Docker Containers Interactively and in Detached Mode

  1. Run Docker Container in Interactive Terminal Detach Mode

  2. Attach to the Running Docker Container

  3. Exit the Docker Container

  4. Stop the Docker Container

  5. Start the Docker Container

  6. Remove the Docker Container


 

### Project Scenario: Running and Managing Docker Containers in Interactive Terminal Mode

  1. Run Docker Container in Interactive Terminal Mode

  2. Check the OS Inside the Container

  3. Exit the Container Without Stopping It

  4. Attach to the Running Container

  5. Start the Container (if stopped)

  6. Exit the Container




 

### Project Scenario: Managing Docker Container by ID and Name

  1. Run an Ubuntu Container

  2. Find the Container ID and Name

  3. Stop the Container Using the Container Name

  4. Start the Container Using the Container Name

  5. Stop the Container Using the Container ID

  6. Start the Container Using the Container ID

  7. Forcefully Remove a Running Container

  8. Remove All Stopped Containers


 

### Project Scenario: Running NGINX in Docker on EC2 and Accessing it Externally ( PORT FARWARDING)

  1. Run NGINX in Detached Mode

  2. List the Running Containers

  3. Find the IP Address and Port of the NGINX Container

  4. Curl the IP Address of the Container

  5. Run NGINX with Port Forwarding to EC2 Default Port

  6. Inspect the NGINX Container to Verify the Port Mapping

  7. Open the NGINX Port on EC2 Instance

  8. Open the NGINX Page in Your Web Browser


 

### Project Scenario: Exposing NGINX on EC2 to Port 9090 Publicly and Accessing It

  1. Run NGINX and Expose Port 9090 Publicly

  2. Inspect the Container to Verify Port Mapping

  3. Find the Mapped Port on the EC2 Instance

  4. Open Port 9090 in the EC2 Security Group

  5. Access NGINX in a Web Browser


 

Docker-Day-3


### Project: Managing Docker Volumes
  • List the Volumes

  • Create a Volume

  • Attach the Volume to a Container

  • Inspect the Volume

  • Go Inside the Container and Create a File

  • Check the File on the Host Node

  • Create a File on the Host Node and Check Inside the Container

  • Delete the Container and Reuse the Volume

  • Copy Files Between Node and Container

  • Difference Between Volume and `docker cp`

### Project: Persistent Jenkins Setup in Docker with Volume Management and Port Configuration


Docker-Day-4


### Project: Create Your Own Docker Image from a Running Container

### Step 1: Run a Container

#### Step 2: Update the Package Manager Inside the Container

#### Step 3: Install Vim

#### Step 4: Commit Changes to a New Image

#### Step 5: Validate the Created Image

#### Step 6: Test the New Image


 

### Project: Create a Docker Image Using a Dockerfile

#### Step 1: Create a Dockerfile

#### Step 2: Build the Image

#### Step 3: Run the Container and Validate Vim Installation

#### Step 4: Check All Layers of the Image

#### Step 5: Tag the Image

#### Step 6: Push to Docker Hub

#### Step 7: Push to Amazon ECR

#### Step 8: Push to JFrog


 

### Project: Containerize a WAR File Using Tomcat



bottom of page