Pulling images from registries
This section explains the Docker lifecycle on the X20 Edge, specifically focusing on pulling Docker images.
Pulling Docker Imagesβ
Docker images are the foundation of containers. They are lightweight, standalone, and executable software packages that include everything needed to run an application. Below are the steps for pulling Docker images.
Before proceeding, ensure you have the following installed on your system, these come preinstalled on the X20 Edge:
Also make sure that your device has internet connectivity to access Docker Hub or a custom registry.
Pulling Images from Docker Hubβ
Docker Hub is a cloud-based repository where Docker users push and pull container images.
-
Open Terminal: Connect to your X20 Edge and open the terminal.
-
Log in to Docker Hub (Optional): You can pull public images without logging in, but for private repositories, you need to authenticate.
docker login
Enter your Docker Hub username and password when prompted.
-
Search for Images: To find available images, use the
docker search
command.docker search <image-name>
Example:
docker search ubuntu
-
Pull an Image: To download an image to your device, use the
docker pull
command.docker pull <image-name>:<tag>
Example:
docker pull ubuntu:latest
-
Verify the Image: After pulling, verify that the image is available locally.
docker images
Using a Custom Registryβ
If your organization hosts private images in a custom registry, follow these steps:
-
Log in to Custom Registry: Authenticate to your custom Docker registry.
docker login <registry-url>
Enter your registry username and password when prompted.
-
Pull an Image from the Custom Registry: Specify the registry URL along with the image name.
docker pull <registry-url>/<image-name>:<tag>
Example:
docker pull myregistry.com/myapp:latest
-
Verify the Image: Check that the pulled image is listed among your local Docker images.
docker images
Example: Pulling a Python Imageβ
Hereβs a practical example of pulling a Python image and running a simple Python container:
-
Pull the Python Image:
docker pull python:3.9
-
Run a Python Container:
docker run -it python:3.9 python
This command will start an interactive Python session inside the container.