Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Docker Articles
Page 3 of 12
Working with Docker Volumes
Docker Volumes are file systems that can be mounted on Docker containers to preserve data independent of the container lifecycle. They allow developers to backup data and share file systems among Docker containers easily. Multiple containers can mount the same volume, enabling seamless data sharing through simple commands and flags. In this article, we will discuss how to create, list, inspect, mount, and delete Docker volumes using command-line operations. Creating a Docker Volume You can create a Docker volume using the create command. Docker creates a directory for the volume on the local machine at /var/lib/docker/volumes/. ...
Read MoreImportant instructions used in dockerfile
Dockerfile is a text file containing a series of instructions that define how to build a Docker image. These instructions are executed sequentially when you run the docker build command, creating layers that form the final image. Understanding key Dockerfile instructions is essential for creating efficient, maintainable, and secure container images. In this article, we'll explore the most important Dockerfile instructions that every developer should master to build optimized Docker images. FROM The FROM instruction specifies the base image for your Docker image and must be the first instruction in any Dockerfile (except for ARG instructions that ...
Read MorePublishing a Docker Image on Dockerhub
Docker Hub is Docker's official cloud-based registry that hosts millions of pre-built Docker images and allows users to publish their own custom images. To interact with Docker Hub for pulling or pushing images, you need to create an account and understand the publishing workflow. Creating a Docker Hub Account and Repository Before publishing images, you must set up your Docker Hub presence − Visit Docker Hub and create an account or sign in with existing credentials. After signing in, click "Create Repository" on the welcome page. Fill in repository details including name, description, and visibility (public ...
Read MoreSearching and pulling Docker Images from Dockerhub
The official Docker registry contains a lot of pre-built images and publicly available customized images that are very useful and can be easily pulled by users on their local machine and used as base images for their projects. In fact, you can also build your own customized docker image using one of those publicly available docker images and push it back either in a public or private mode. In this article, we will discuss how to search for a docker image using the search command through the command line interface. We will also see how to filter the search ...
Read MoreDocker Image tags and how to use them
Docker Image tags are simple labels or aliases given to a Docker image before or after building to describe that particular image. Tags can represent the version of the project, features of the image, technologies used, or any descriptive identifier. They play a key role in the overall software development lifecycle by helping track different parts of your project and enabling effective version management. While pulling an image, you can specify the tag of the image you want. If not specified, Docker will pull the latest tagged image automatically. Let's explore the common ways tagging is used when working ...
Read MoreHow to run a command inside Docker Container?
After you build a Docker image and create a running instance of it (a Docker container), you might want to execute commands inside the container to install packages, browse directories, or perform various tasks. Docker provides several methods to access the container environment and execute commands. In this article, we will explore different ways to run commands inside Docker containers. Using Docker exec Command The docker exec command allows you to run commands in a running container from your local machine's command line. First, you need the container ID of the target container. Get Container Information ...
Read MoreBuilding a full-fledged data science Docker Container
The combination of machine learning and containerization has revolutionized how data scientists develop and deploy applications. Organizations are rapidly adopting machine learning techniques to analyze data and improve customer satisfaction, while Docker containers provide a consistent, portable environment for development and deployment. In this article, we will build a comprehensive data science Docker container with all essential libraries and packages pre-installed. This containerized environment will help you get started with machine learning and data science projects quickly and efficiently. Essential Python Libraries for Data Science Before building our container, let's examine the core Python packages needed for ...
Read MoreMaintain and Manipulate Docker Containers
Knowing how to create a dockerfile and build a docker image using that dockerfile, we can move ahead and dive deep into more advanced ways to manipulate docker containers. When we talk about manipulating docker containers, we include running, listing, restarting, cleaning up the dangling containers, running containers in interactive and detached modes, creating containers using executable images, executing commands inside docker containers using exec command and starting a bash inside a container, accessing logs from a docker container and killing or stopping a docker container. Without any further ado, let's dive deep into manipulating docker containers. Running ...
Read MoreRunning a static site on Apache Server from Docker
Docker containers are widely used in development workflows for building, distributing, testing, and deploying applications. They enable developer collaboration, version management, and local testing by hosting applications on containerized servers. This article demonstrates how to run a static website on an Apache server inside a Docker container and access it through your local browser. A static website consists of HTML, CSS, and minimal JavaScript without dynamic content rendering. Project Structure First, create the following directory structure − project-folder/ ├── Dockerfile └── mysite/ └── index.html Creating the Static Website ...
Read MoreHow to use an OVS Bridge for Networking on Docker?
OVS bridges or Open vSwitch bridges are used as an alternative to the native bridges in Linux. They support most features found in physical switches while also supporting multiple VLANs on a single bridge. OVS is widely used in Docker networking because it provides enhanced multi-host networking capabilities and more secure communication compared to native bridges. In this article, we will discuss how to perform Docker networking using Open vSwitch bridges (OVS). We will cover the installation of OVS and the OVS utility for Docker, create an OVS bridge, connect two Docker containers to the bridge, and test the ...
Read More