Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • GfG 160: Daily DSA
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • DevOps Lifecycle
  • DevOps Roadmap
  • Docker Tutorial
  • Kubernetes Tutorials
  • Amazon Web Services [AWS] Tutorial
  • AZURE Tutorials
  • GCP Tutorials
  • Docker Cheat sheet
  • Kubernetes cheat sheet
  • AWS interview questions
  • Docker Interview Questions
  • Ansible Interview Questions
  • Jenkins Interview Questions
Open In App
Next Article:
What is Docker?
Next article icon

Docker Tutorial

Last Updated : 28 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Docker is a tool that simplifies the process of developing, packaging, and deploying applications. By using containers, Docker allows you to create lightweight, self-contained environments that run consistently on any system, minimising the time between writing code and deploying it into production.

In this tutorial, we will guide you through Docker from scratch. You’ll understand Docker’s key features, how it works, and how to perform important tasks such as installing Docker, running containers, managing images, and handling other essential Docker operations used in development and deployment.

Docker Introduction

Let us start with an introduction to help you understand what Docker is and why it's widely used across the globe. Next, we’ll cover the key features of Docker and how it benefits application development and deployment. Finally, we’ll explain Docker Architecture to give you a clear understanding of how Docker works.

After giving you this basics clarity we will move on to central registry Docker Hub for sharing and managing containers and at last of this section we will introduce Docker Cloud where you will learn about the utilization of docker in the cloud environment.

  • What is Docker
  • Docker Architecture
  • Features of Docker
  • Docker Hub
  • Docker Cloud

Docker Installation

This section will walk you through the steps of installing Docker on your system, whether it's Windows, macOS, or Linux. We'll cover the different installation methods, system requirements, and post-installation configurations to ensure you have Docker up and running smoothly, ready to build and run your containerized application

  • Docker Installation on Windows
  • Docker Installation on Windows using Chocolatey
  • Docker Installation on Ubuntu
  • Docker Installation on macOS
  • Docker Installation on Arch-based Linux
  • Docker Installation on RedHat

Docker Commands

When you want to build, run, or manage containers, you use Docker commands. These commands make it easy to control your Docker applications and get things done quickly. This section will teach you the key Docker commands you need to work with containers.

  • Docker Instructions
  • Run Commands Inside Containers
  • USER Instruction

Docker Run and Dockerfile

docker run is the command used in Docker to create and start containers based on Docker images. It's a fundamental aspect of working with Docker, allowing users to deploy applications and services quickly and efficiently within isolated environments known as containers. Here in this section, you will get to know all the details about the Docker Run.

  • What is Dockerfile?
  • Syntax of Dockerfile
  • How to Build a Web Server Docker File?

Docker Images

A Docker Image contains everything a container needs to run, including the application code, libraries, dependencies, and the operating system it needs, Here is all you need to know about Docker images:

  • What is Docker Images?
  • Working with Images
  • Publish Docker Images in Hub
  • Create a Customized Image
  • Image Tags
  • How to use Next.js Image
  • How to use Local Image with Minikube

Docker Compose

When working with several containers at once, things can get complicated. Docker Compose makes managing these multi-container applications simple and efficient. Here, you’ll learn about Docker Compose and the key tools that make container management easier.

  • Introduction to Docker Compose
  • Compose tools to run Multi Container Apps

Docker Engine and Storage

Docker Engine, also known as Docker Daemon, is the core component of the Docker platform responsible for running and managing Docker containers. Explore this section to get all details about Docker Engine:

  • Docker Storage
  • Docker Data Storage
  • Backup Docker Container
  • Manage Volumes using CLI (command line interface)

Docker Networking

Docker Networking refers to the set of mechanisms and technologies Docker provides for communication between Docker containers, as well as between containers and the outside world. Go through this section to get more details about Docker Networking:

  • Docker Networking
  • Docker Ports
  • Creating a Network and connecting a Container
  • Connecting Two Docker Containers Over the Same Network
  • Default Bridge Networking
  • Create your own secure Home Network using Pi-hole and Docker

Docker Registry

After learning the Docker Networking, in this Docker tutorial, we are going to discuss Docker Registry which is refer as central repository for storing the and managing Docker image.

  • Docker Registry
  • Docker - Public Repositories
  • Docker - Private Registries
  • Creating a Private Repository and Push an Image to That Private Repository
  • Using Public Repositories To Host Docker Images

Docker Containers and Managing Containers

Explores this section to get to know about the fundamental concepts and practical aspects of utilizing Docker technology to deploy and manage software applications efficiently in this section:

  • What are Docker Containers and How do they work?
  • Docker Container Virtualization
  • Docker Container for Node.js
  • Remove Containers
  • Push a Container Image to a Docker Repository
  • Docker Container Linking
  • Manage Containers using CLI
  • Mount Volume inside Container
  • Difference between Images and Container
  • Difference between Virtual Machines and Containers
  • How to Install Linux Package in Docker Container
  • Copying Files to and from Docker Containers
  • Run MongoDB as Container
  • Container for Node.js
  • Container for NGNIX
  • How to Provide the Static IP to a Docker Container?

Docker Swarm

Docker Swarm steps in as your reliable organizer, making sure all your containers are in the right place and working well together. Go through this section to get an all about Docker Swarm.

  • Introduction to Docker Swarm
  • Difference between Kubernetes and Docker Swarm

Miscellaneous

In this section we are going to know about the miscellaneous topics of docker which are important and very easy to learn:

  • Running a Java Application using Docker
  • Running a PHP Application using Docker
  • Running a Python Application using Docker
  • How to Dockerize an ExpressJS App?
  • How to Dockerize a ReactJS App?
  • Docker Vs Kubernetes
  • Deploying WebApps on Docker
  • Docker Continuous Integration
  • Difference Between Vagrant and Docker
  • How to Setup Jenkins in Docker Container?

Advantages of Using Docker

Docker containers are widely used by developers for building, testing and shipping applications faster across any platform. Apart from this there are so many other benefits provided by Docker. The following are the advantages of docker:

  • Your application will work same on any system whether you are using any laptop, server or any cloud (AWS, GCP, Azure).
  • In docker each application will run on it's own space, so it won't hamper another application work.
  • Docker containers start quickly, so your app runs in no time.
  • You can test new features without changing your main application
  • Docker uses less memory and power than virtual machines
  • You can easily add more containers if more people use your application.
  • Docker works well into development tools and automation setup.

Conclusion

Docker is a software development framework that allows you to package and run apps inside virtual machines on a server. It's often used to create and test applications before deploying them on a real, physical server. This allows organizations to test and deploy their applications quickly and with minimal resources. Docker also makes it easy to package and update apps on any server, regardless of its hardware configuration.


Next Article
What is Docker?

A

amanchopra
Improve
Article Tags :
  • Docker
  • DevOps
  • Tutorials

Similar Reads

  • Docker Tutorial
    Docker is a tool that simplifies the process of developing, packaging, and deploying applications. By using containers, Docker allows you to create lightweight, self-contained environments that run consistently on any system, minimising the time between writing code and deploying it into production.
    7 min read
  • Introduction

    • What is Docker?
      Have you ever wondered about the reason for creating Docker Containers in the market? Before Docker, there was a big issue faced by most developers whenever they created any code that code was working on that developer computer, but when they try to run that particular code on the server, that code
      12 min read

    • Features of Docker
      Pre-requisite: Docker Docker is one of the most popular open-source sets of platforms for developing and automating the deployment of applications. It deploys applications into containers and enables us to separate our applications from infrastructure. It is designed to provide a lightweight and fas
      4 min read

    • Architecture of Docker
      Pre-requisite: DockerDocker makes use of a client-server architecture. The Docker client talks with the docker daemon which helps in building, running, and distributing the docker containers. The Docker client runs with the daemon on the same system or we can connect the Docker client with the Docke
      4 min read

    • What is Docker Hub?
      Docker Hub is a repository service and it is a cloud-based service where people push their Docker Container Images and also pull the Docker Container Images from the Docker Hub anytime or anywhere via the internet. It provides features such as you can push your images as private or public. Mainly De
      12 min read

    • What is Docker Cloud?
      Docker is a software platform that provides some special kind of facilities, like a service provider that allows you to build, test, and deploy your application in centralized processing and quickly. So, the Docker Cloud is basically working as a service provider by Docker in which we can perform su
      10 min read

    Docker Installation

    • Docker - Installation on Windows
      In this article, we are going to see how to install Docker on Windows. On windows if you are not using operating system Windows 10 Pro then you will have to install our docker toolbox and here docker will be running inside a virtual machine and then we will interact with docker with a docker client
      2 min read

    • How to Install Docker using Chocolatey on Windows?
      Installing Docker in Windows with just the CLI is quite easier than you would expect. It just requires a few commands. This article assumes you have chocolatey installed on your respective windows machine. If not, you can install chocolatey from here. Chocolatey is a package manager for the Windows
      4 min read

    • How to Install and Configure Docker in Ubuntu?
      Docker is a platform and service-based product that uses OS-level virtualization to deliver software in packages known as containers. Containers are separated from one another and bundle their software, libraries, and configuration files. Docker is written in the Go language. Docker can be installed
      6 min read

    • How to Install Docker on MacOS?
      Pre-requisites: Docker-Desktop Docker Desktop is a native desktop application for Windows and Mac's users created by Docker. It is the most convenient way to launch, build, debug, and test containerized apps. Docker Desktop includes significant and helpful features such as quick edit-test cycles, fi
      2 min read

    • How to install and configure Docker on Arch-based Linux Distributions(Manjaro) ?
      In this article, we are going to see how to install and configure Docker on Arch-based Linux Distributions. Docker is an open-source containerization platform used for building, running, and managing applications in an isolated environment. A container is isolated from another and bundles its softwa
      2 min read

    • How to Install Docker-CE in Redhat 8?
      Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all the parts it needs, such as libraries and other dependencies, and deploy it as one package. Installing Docker-CE in Redhat 8: St
      2 min read

    Docker Commands

    • Docker Commands
      Docker is an open-source project that automates the deployment of applications as movable, independent containers that can run locally or in the cloud. You can divide your applications from your infrastructure with the help of Docker, allowing for quick software delivery and it also allows you to ma
      7 min read

    • How to Install Docker using Chocolatey on Windows?
      Installing Docker in Windows with just the CLI is quite easier than you would expect. It just requires a few commands. This article assumes you have chocolatey installed on your respective windows machine. If not, you can install chocolatey from here. Chocolatey is a package manager for the Windows
      4 min read

    • How to Install and Configure Docker in Ubuntu?
      Docker is a platform and service-based product that uses OS-level virtualization to deliver software in packages known as containers. Containers are separated from one another and bundle their software, libraries, and configuration files. Docker is written in the Go language. Docker can be installed
      6 min read

    • How to Install Docker on MacOS?
      Pre-requisites: Docker-Desktop Docker Desktop is a native desktop application for Windows and Mac's users created by Docker. It is the most convenient way to launch, build, debug, and test containerized apps. Docker Desktop includes significant and helpful features such as quick edit-test cycles, fi
      2 min read

    • How to install and configure Docker on Arch-based Linux Distributions(Manjaro) ?
      In this article, we are going to see how to install and configure Docker on Arch-based Linux Distributions. Docker is an open-source containerization platform used for building, running, and managing applications in an isolated environment. A container is isolated from another and bundles its softwa
      2 min read

    • How to Install Docker-CE in Redhat 8?
      Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all the parts it needs, such as libraries and other dependencies, and deploy it as one package. Installing Docker-CE in Redhat 8: St
      2 min read

    Docker Commands

    • Docker Commands
      Docker is an open-source project that automates the deployment of applications as movable, independent containers that can run locally or in the cloud. You can divide your applications from your infrastructure with the help of Docker, allowing for quick software delivery and it also allows you to ma
      7 min read

    • Running Commands Inside Docker Container
      If you are working on an application inside the Docker Container, you might need commands to install packages or access file system inside the Docker Container. Executing commands inside Docker Containers should be easy enough for you since you have to do it multiple times across your development ph
      6 min read

    • Docker - USER Instruction
      By default, a Docker Container runs as a Root user. This poses a great security threat if you deploy your applications on a large scale inside Docker Containers. You can change or switch to a different user inside a Docker Container using the USER Instruction. For this, you first need to create a us
      2 min read

    Docker Images

    • What is Docker Image?
      Docker Image is an executable package of software that includes everything needed to run an application. This image informs how a container should instantiate, determining which software components will run and how. Docker Container is a virtual environment that bundles application code with all the
      10 min read

    • Working with Docker Images
      If you are a Docker developer, you might have noticed that working with multiple Docker Images at the same time might be quite overwhelming sometimes. Managing numerous Docker Images all through a single command line is a very hefty task and consumes a lot of time. In this article, we are going to d
      2 min read

    • Docker - Publishing Images to Docker Hub
      Docker is a container platform that facilitates creating and managing containers. In this article, we will see how docker stores the docker images in some popular registries like Dockerhub and how to publish the Docker images to Docker Hub. By publishing the images to the docker hub and making it pu
      8 min read

    • Docker Commit
      Docker is an open-source container management service and one of the most popular tools of DevOps which is being popular among the deployment team. Docker is mostly used in Agile-based projects which require continuous delivery of the software. The founder, Chief Technical Officer, and Chief Archite
      10 min read

    • Docker - Using Image Tags
      Image tags are used to describe an image using simple labels and aliases. Tags can be the version of the project, features of the Image, or simply your name, pretty much anything that can describe the Image. It helps you manage the project's version and lets you keep track of the overall development
      7 min read

    • Next.js Docker Images
      Using Next.js Docker images allows your app to deploy to multiple environments, and is more portable, isolated and scalable in dev and prod. Docker’s containerization makes app management super easy, you can move from one stage to another with performance.Before we get started, let’s cover the basic
      14 min read

    • How to Use Local Docker Images With Minikube?
      Minikube is a software that helps in the quick setup of a single-node Kubernetes cluster. It supports a Virtual Machine (VM) that runs over a docker container and creates a Kubernetes environment. Now minikube itself acts as an isolated container environment apart from the local docker environment,
      7 min read

    Docker Compose

    • Docker Compose
      An open-source platform called Docker makes designing, shipping, and deploying applications simple. It runs an application in an isolated environment by compiling its dependencies into a so-called container. for additional information on Docker. In a normal case, several services, such as a database
      15+ min read

    • Docker Compose Tool To Run aMulti Container Applications
      The article talks about how to run multi-container applications using a single command. Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you can configure a file (YAML file) to configure your docker containers. Then Once you configured the Yaml fil
      8 min read

    Docker Engine, Storage

    • Data Storage in Docker
      Docker images are built-in form of layers and docker containers store all the data being used, on the container writable layer which is only persisted till the lifespan of the container i.e. it is no longer accessible once the container is removed. This also makes it difficult to get the data out of
      4 min read

    • Data Storage in Docker
      Docker images are built-in form of layers and docker containers store all the data being used, on the container writable layer which is only persisted till the lifespan of the container i.e. it is no longer accessible once the container is removed. This also makes it difficult to get the data out of
      4 min read

    • Backing up a Docker Container
      If you are a Docker Developer, you would surely know how important it is to backup your Docker Container file system. If you are working on an important Docker Application, it becomes very necessary to backup all the files and folders related to it so that in case anything goes wrong, you can get ba
      2 min read

    • Using CLI to Manage Docker Volumes
      If you want to share files and directories among multiple Docker Containers, you can easily mount Docker Volumes to different Containers. However, managing such a large number of Docker Volumes becomes very difficult at times. In this article, we are going to discuss how to manage Docker Volumes by
      7 min read

    Docker Networking

    • Docker Networking
      Pre-requisite: Docker Docker Networking allows you to create a Network of Docker Containers managed by a master node called the manager. Containers inside the Docker Network can talk to each other by sharing packets of information. In this article, we will discuss some basic commands that would help
      5 min read

    • Docker - Managing Ports
      Pre-requisites: Docker Docker is a set of platform-as-a-service products that use OS-level virtualization to deliver software in packages called containers. These containers may need to talk to each other or to services outside docker, for this we not only need to run the image but also expose the c
      4 min read

    • Creating a Network in Docker and Connecting a Container to That Network
      Networks are created so that the devices which are inside that network can connect to each other and transfer of files can take place. In docker also we can create a network and can create a container and connect to the respective network and two containers that are connected to the same network can
      2 min read

    • Connecting Two Docker Containers Over the Same Network
      Whenever we expose a container's port in docker, it creates a network path from the outside of that machine, through the networking layer, and enters that container. In this way, other containers can connect to it by going out to the host, turning around, and coming back in along that path.Docker of
      3 min read

    • How to use Docker Default Bridge Networking?
      Docker allows you to create dedicated channels between multiple Docker Containers to create a network of Containers that can share files and other resources. This is called Docker Networking. You can create Docker Networks with various kinds of Network Drivers which include Bridge drivers, McVLAN dr
      7 min read

    • Create your own secure Home Network using Pi-hole and Docker
      Pi-hole is a Linux based web application, which is used as a shield from the unwanted advertisement in your network and also block the internet tracking system. This is very simple to use and best for home and small office networks. This is totally free and open-source. It also allows you to manage
      3 min read

    Docker Registry

    • What is Docker Registry?
      Docker Registry is a centralized storage and distributed system for collecting and managing the docker images. It provides both public and private repositories as per the choice whether to make the image accessible publicly or not. It is an essential component in the containerization workflow for st
      10 min read

    • Docker - Using Public Repositories To Host Docker Images
      Docker is a software platform for creating isolated virtualized environments for building, deploying, and testing applications with ease. In this tutorial, we will learn how to host public repositories on docker hub which is a hosted repository service provided by Docker for finding and sharing cont
      10 min read

    • Docker - Private Registries
      Pre-requisites: Docker, Docker HUB Docker registry is your own private repository where you can store your own Docker images and share them with others. Docker Registry is basically organized into Docker Repositories. Within the docker Repository, you can maintain specific versions of a Docker Image
      3 min read

    • Creating a Private Repository and Push an Image to That Private Repository
      In this article, we show how to create a docker hub account and pull the image from the docker hub repository and push our image to the docker hub repository. As the docker hub is a public repository that can be accessed by anyone so one can create their own private repository to which they can push
      2 min read

    • Docker - Using Public Repositories To Host Docker Images
      Docker is a software platform for creating isolated virtualized environments for building, deploying, and testing applications with ease. In this tutorial, we will learn how to host public repositories on docker hub which is a hosted repository service provided by Docker for finding and sharing cont
      10 min read

geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

'); // $('.spinner-loading-overlay').show(); let script = document.createElement('script'); script.src = 'https://assets.geeksforgeeks.org/v2/editor-prod/static/js/bundle.min.js'; script.defer = true document.head.appendChild(script); script.onload = function() { suggestionModalEditor() //to add editor in suggestion modal if(loginData && loginData.premiumConsent){ personalNoteEditor() //to load editor in personal note } } script.onerror = function() { if($('.editorError').length){ $('.editorError').remove(); } var messageDiv = $('
').text('Editor not loaded due to some issues'); $('#suggestion-section-textarea').append(messageDiv); $('.suggest-bottom-btn').hide(); $('.suggestion-section').hide(); editorLoaded = false; } }); //suggestion modal editor function suggestionModalEditor(){ // editor params const params = { data: undefined, plugins: ["BOLD", "ITALIC", "UNDERLINE", "PREBLOCK"], } // loading editor try { suggestEditorInstance = new GFGEditorWrapper("suggestion-section-textarea", params, { appNode: true }) suggestEditorInstance._createEditor("") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } //personal note editor function personalNoteEditor(){ // editor params const params = { data: undefined, plugins: ["UNDO", "REDO", "BOLD", "ITALIC", "NUMBERED_LIST", "BULLET_LIST", "TEXTALIGNMENTDROPDOWN"], placeholderText: "Description to be......", } // loading editor try { let notesEditorInstance = new GFGEditorWrapper("pn-editor", params, { appNode: true }) notesEditorInstance._createEditor(loginData&&loginData.user_personal_note?loginData.user_personal_note:"") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } var lockedCasesHtml = `You can suggest the changes for now and it will be under 'My Suggestions' Tab on Write.

You will be notified via email once the article is available for improvement. Thank you for your valuable feedback!`; var badgesRequiredHtml = `It seems that you do not meet the eligibility criteria to create improvements for this article, as only users who have earned specific badges are permitted to do so.

However, you can still create improvements through the Pick for Improvement section.`; jQuery('.improve-header-sec-child').on('click', function(){ jQuery('.improve-modal--overlay').hide(); $('.improve-modal--suggestion').hide(); jQuery('#suggestion-modal-alert').hide(); }); $('.suggest-change_wrapper, .locked-status--impove-modal .improve-bottom-btn').on('click',function(){ // when suggest changes option is clicked $('.ContentEditable__root').text(""); $('.suggest-bottom-btn').html("Suggest changes"); $('.thank-you-message').css("display","none"); $('.improve-modal--improvement').hide(); $('.improve-modal--suggestion').show(); $('#suggestion-section-textarea').show(); jQuery('#suggestion-modal-alert').hide(); if(suggestEditorInstance !== null){ suggestEditorInstance.setEditorValue(""); } $('.suggestion-section').css('display', 'block'); jQuery('.suggest-bottom-btn').css("display","block"); }); $('.create-improvement_wrapper').on('click',function(){ // when create improvement option clicked then improvement reason will be shown if(loginData && loginData.isLoggedIn) { $('body').append('
'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status) }, }); } else { if(loginData && !loginData.isLoggedIn) { $('.improve-modal--overlay').hide(); if ($('.header-main__wrapper').find('.header-main__signup.login-modal-btn').length) { $('.header-main__wrapper').find('.header-main__signup.login-modal-btn').click(); } return; } } }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ } $('.improve-modal--improvement').show(); }); const showErrorMessage = (result,statusCode) => { if(!result) return; $('.spinner-loading-overlay:eq(0)').remove(); if(statusCode == 403) { $('.improve-modal--improve-content.error-message').html(result.message); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); return; } } function suggestionCall() { var editorValue = suggestEditorInstance.getValue(); var suggest_val = $(".ContentEditable__root").find("[data-lexical-text='true']").map(function() { return $(this).text().trim(); }).get().join(' '); suggest_val = suggest_val.replace(/\s+/g, ' ').trim(); var array_String= suggest_val.split(" ") //array of words var gCaptchaToken = $("#g-recaptcha-response-suggestion-form").val(); var error_msg = false; if(suggest_val != "" && array_String.length >=4){ if(editorValue.length { jQuery('.ContentEditable__root').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } } document.querySelector('.suggest-bottom-btn').addEventListener('click', function(){ jQuery('body').append('
'); jQuery('.spinner-loading-overlay').show(); if(loginData && loginData.isLoggedIn) { suggestionCall(); return; } // script for grecaptcha loaded in loginmodal.html and call function to set the token setGoogleRecaptcha(); }); $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('
'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status); }, }); });
"For an ad-free experience and exclusive features, subscribe to our Premium Plan!"
Continue without supporting
`; $('body').append(adBlockerModal); $('body').addClass('body-for-ad-blocker'); const modal = document.getElementById("adBlockerModal"); modal.style.display = "block"; } function handleAdBlockerClick(type){ if(type == 'disabled'){ window.location.reload(); } else if(type == 'info'){ document.getElementById("ad-blocker-div").style.display = "none"; document.getElementById("ad-blocker-info-div").style.display = "flex"; handleAdBlockerIconClick(0); } } var lastSelected= null; //Mapping of name and video URL with the index. const adBlockerVideoMap = [ ['Ad Block Plus','https://media.geeksforgeeks.org/auth-dashboard-uploads/abp-blocker-min.mp4'], ['Ad Block','https://media.geeksforgeeks.org/auth-dashboard-uploads/Ad-block-min.mp4'], ['uBlock Origin','https://media.geeksforgeeks.org/auth-dashboard-uploads/ub-blocke-min.mp4'], ['uBlock','https://media.geeksforgeeks.org/auth-dashboard-uploads/U-blocker-min.mp4'], ] function handleAdBlockerIconClick(currSelected){ const videocontainer = document.getElementById('ad-blocker-info-div-gif'); const videosource = document.getElementById('ad-blocker-info-div-gif-src'); if(lastSelected != null){ document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.backgroundColor = "white"; document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.borderColor = "#D6D6D6"; } document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.backgroundColor = "#D9D9D9"; document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.borderColor = "#848484"; document.getElementById('ad-blocker-info-div-name-span').innerHTML = adBlockerVideoMap[currSelected][0] videocontainer.pause(); videosource.setAttribute('src', adBlockerVideoMap[currSelected][1]); videocontainer.load(); videocontainer.play(); lastSelected = currSelected; }

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences