[{ "title": "Docker Swarm Registry", "url": "https://skupr.dev/docker-swarm-registry/", "meta": "Docker Swarm is a container orchestration platform that allows you to deploy and manage multiple containers across a cluster of machines. A Docker reg…", "body": "Docker Swarm is a container orchestration platform that allows you to deploy and manage multiple containers across a cluster of machines. A Docker registry is a centralized place to store and manage Docker images, which are the packaged applications that run inside Docker containers.\n\nIn a Docker Swarm environment, the Docker registry is important for several reasons. First, it enables you to easily distribute and share your Docker images across the cluster, ensuring that all nodes have access to the latest version of the application. Second, it helps you to manage container versions and maintain consistency across the cluster. By using a registry, you can easily roll back to previous versions of the application if needed. Finally, it provides a way to authenticate and authorize access to the images, ensuring that only authorized users have access to the container images.\nIn summary, the Docker registry is an essential component of a Docker Swarm environment, providing a centralized and secure way to manage and distribute container images across the cluster.\nOne drawback of the installation example from the official docs is that we need to manage SSL certificates manually. \nHere is an example of how to automate it by using Traefik and Let's Encrypt in Docker Swarm with a docker-compose.yaml file:\nversion: "3.8"\n\nnetworks:\n # Should be created before\n traefik-public:\n external: true\n\nservices:\n registry:\n image: registry:2\n networks:\n - traefik-public\n deploy:\n replicas: 1\n placement:\n constraints:\n # Use some constraints\n - node.role == registry\n labels:\n - traefik.enable=true\n - traefik.docker.network=traefik-public\n - traefik.constraint-label=traefik-public\n # `registry` is a stack that this service is deployed to\n - traefik.http.routers.registry-http.rule=Host(`your-registry-host`)\n - traefik.http.routers.registry-http.entrypoints=http\n - traefik.http.routers.registry-http.middlewares=https-redirect\n - traefik.http.routers.registry-https.rule=Host(`your-registry-host`)\n - traefik.http.routers.registry-https-https.entrypoints=https\n - traefik.http.routers.registry-https.tls=true\n - traefik.http.routers.registry-https.tls.certresolver=le\n - traefik.http.services.registry.loadbalancer.server.port=5000\n # https://doc.traefik.io/traefik/middlewares/http/basicauth/\n - traefik.http.middlewares.test-auth.basicauth.users=<user>:<password>\n\nIt can be deployed like this:\ndocker stack deploy -c docker-compose.yaml registry\n\n" },{ "title": "About", "url": "https://skupr.dev/about/", "meta": "Hey there and welcome to my tech blog!\nI'm a tech enthusiast and this blog is a way to share my thoughts, experience, and insights about tech things w…", "body": "Hey there and welcome to my tech blog!\nI'm a tech enthusiast and this blog is a way to share my thoughts, experience, and insights about tech things with others. \nFrom Python to Rust and embedded programming, I cover a wide range of topics that I find interesting and relevant.\nMy aim is to share my knowledge, tips, and experience about tech. I believe that technology has the power to improve our lives and solve some of the world's biggest challenges, and I want to help others understand how it works and what it can do.\nIf you have any questions, suggestions or opportunities for cooperation, feel free to reach out to me through email at skupr.dev. I'm always happy to hear from my readers and learn from their experiences.\nThanks for visiting my blog – I hope you find my content informative and useful!\n" }]