How to install Docker RPM Packages (Offline) on Alma Linux 9.5 and create local docker registry
In this video we are going to show How to install Docker Engine from rpm packages in Alma Linux 9 Operating System.
Internet connection is needed to pull the images from docker hub.
1. Download the Docker Engine RPM packages for EL9
https://download.docker.com/linux/rhel/9/x86_64/stable/Packages/
2. Install the docker binaries and Enable docker engine.
rpm -ivh docker-compose-plugin docker-buildx-plugin docker-ce-cli containerd.io docker-ce-rootless-extras docker-ce
3. To run Docker without root privileges, see Run the Docker daemon as a non-root user (Rootless mode).
a. To create the docker group and add your user:
Create the docker group.
sudo groupadd docker
b. Add your user to the docker group.
sudo usermod -aG docker $USER
c. Log out and log back in so that your group membership is re-evaluated.
If you're running Linux in a virtual machine, it may be necessary to restart the virtual machine for changes to take effect.
You can also run the following command to activate the changes to groups:
newgrp docker
d. Verify that you can run docker commands without sudo.
docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints a message and exits.
4. Pull and Run Docker registry image latest
docker run -d -p 5000:5000 --restart=always --name registry registry:latest
5. Download any image you like and tag the image.
docker pull amazonlinux:latest
docker tag ubuntu:latest localhost:5000/myamazon:2023
6. Push the image to local docker registry
docker push localhost:5000/myamazon:2023
7. Curl command.
curl localhost:5000/v2/_catalog
8. Docker images and containers and local registry location stored (/var/lib)
9. Now try yourself pulling the image from local registry.
docker pull localhost:5000/myamazon:2023
#installdocker #setupdocker #dockeroffline #docker #dockerengine #dockercontainers #localdockerregistry #dockerlinux