🐋Day 16 - Docker for DevOps Engineers.

🐋Day 16 - Docker for DevOps Engineers.

🐋Docker

Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime. Using Docker, you can quickly deploy and scale applications into any environment and know your code will run.

🐋Tasks

As you have already installed docker in previous days tasks, now is the time to run Docker commands.

  1. docker run: Getting Started

    • This command is your go-to for starting a new container.

    • Example: docker run -d -p 8000:8000 nginx:latest

  2. docker inspect: A Closer Look

    • This command lets you peek inside a container or image to see what's going on.

    • Example: docker inspect <container_or_image_id>

  3. docker port: Checking Ports

    • Sometimes you need to know which ports are open on a container. This command helps with that.

    • Example: docker port <container_id>

  4. docker stats: Keeping an Eye on Resources

    • Want to know how much CPU and memory your containers are using? This command has you covered.

    • Example: docker stats <container1> <container2>

  5. docker top: Peeking Inside

    • This command lets you see what's happening inside a container.

    • Example: docker top <container_id>

  6. docker save and docker load: Saving and Loading

    • Sometimes you want to save your Docker images to a file or load them back. These commands help you do just that.

    • Examples:

      • Save: docker save -o <output_file.tar> <image_name>

      • Load: docker load -i <input_file.tar>

💚Happy Learning :)