Let’s talk about how to download a specific version of any image in the docker using the docker pull command. you can also create a Dockerfile where you define your requirement and it will start its work. you can use this image later to create more docker containers with the same configuration.
How To Download Specific Version:
This work reduces your time because everything is already configured and ready to make containers using those images. There’s another way to create the same container. you can create a new container using the running one and later stopped the current one.
We can also use Docker swarm services to create replicas of running containers for high availability of it. you can create these files using the docker swarm where you can define replicas and all other information to have a container more than one.
we can also pull the images with version if you don't specify it, docker pulls the latest image with tag. Whenever you try to pull the image of any package without specifying the version then docker starts downloading the latest version from the docker hub. If you need a particular version of that image so you will have to do it in this way. I will show you here both ways to pull the images.
Check Out: Container Logs
Pull an image of PHP without Specifying the version
docker pull php
The above command has downloaded the latest PHP version 7.2 with tag latest as shown in the figure.
Pull an image of PHP with Specifying the version
docker pull php:7.0
As you can see now you have PHP 7.0 version.
In the same way, you can download the specific version of the images.
docker pull package_name:version
YouTube Link: Download Specific Version of an Image
You’re done pull image in docker docker specific version image