Skip to content

fortis.te.ua

IT блог

Menu
  • Про блог
  • Завантаження
Menu

How to create local docker registry

Posted on 18.07.202318.07.2023 by sirius

To create a Docker local registry, you can follow these steps:

Run the registry container: Open a terminal or command prompt and run the following command to start a local Docker registry container:

docker run -d -p 5000:5000 –name local-registry registry:2

This command pulls the registry:2 image from Docker Hub and starts a container named local-registry. The -p 5000:5000 flag maps port 5000 on your host machine to port 5000 inside the container, which is the default port for the Docker registry.

Verify the registry container: Run the following command to check if the local registry container is running:

docker ps

Ensure that the local-registry container is listed and has the status Up or Running.

Tag your Docker image: Before pushing an image to the local registry, you need to tag it with the registry’s address. Assuming you have an image named your-image-name, run the following command to tag it:

docker tag your-image-name localhost:5000/your-image-name

Replace your-image-name with the name of the image you want to push to the local registry.

Push the image to the local registry: Once you have tagged the image, push it to the local registry by running the following command:

docker push localhost:5000/your-image-name

This command pushes the image to the local registry using the address localhost:5000 and the image name you tagged in the previous step.

Verify the pushed image: You can check if the image was successfully pushed to the local registry by running the following command:

curl -X GET http://localhost:5000/v2/_catalog

If the image was pushed successfully, you should see the image name listed in the output.

Залишити відповідь Скасувати коментар

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *

Недавні записи

  • Налаштування DHCP клієнта і сервера на cisco роутері
  • Налаштування статичної маршрутизації на маршрутизаторі cisco (Setup static route in cisco routers)
  • Install Loki and start as service.
  • Create swap space on Ubuntu
  • How to grow partition in AWS instance

Останні коментарі

  1. sirius до Інсталяція Zabbix

Архіви

  • Квітень 2024
  • Грудень 2023
  • Липень 2023
  • Січень 2023
  • Грудень 2022
  • Листопад 2022
  • Жовтень 2022
  • Липень 2022
  • Червень 2022

Категорії

  • AWS
  • BASH
  • cisco
  • Docker
  • Docker
  • GitHub
  • HTTP(s)
  • Jenkins
  • Linux
  • Monitoring
  • Networking
  • ssh
  • Tools
  • Trash
  • Ubuntu 20.04
  • VSphere
  • Windows
  • Zabbix
©2024 fortis.te.ua | Built using WordPress and Responsive Blogily theme by Superb