Docker Hub vs Docker Trusted Registry DTR - docker

I'm about to configure my DTR "Docker Trusted Registry" for the first time and it seems complicated.
So before making an entire decision, I want to know what is the difference between "Docker Hub" and "Docker Trusted Registry"?
Thank you

Docker Hub is a SaaS based solution hosted in the cloud where you have public and optionally paid private repositories.
DTR is part of the on-premises enterprise edition (EE) solution. It consist of:
a supported docker engine that updates less frequently than the community edition and includes 1 year of support for any given release.
using swarm mode for scheduling services
support for Kubernetes has just been added in the 2.0 release
UCP (universal control plane) for RBAC security
DTR (docker trusted registry) for an enterprise registry
Over the self hosted free registry, DTR adds RBAC security that piggy backs on UCP, image scanning of all the layers of the image against well known vulnerability databases, replication for HA, built in garbage collection of deleted images, image promotion policies, and multiple storage backends to keep your image data in an HA location. The first two (RBAC and vulnerability scanning) are the main features enterprises are looking for when selecting DTR in addition to the commercial support provided by Docker Inc.

Related

which is better way to install jenkins docker or kubernetes

I am new to devops. I want to install jenkins. So out of all options available to install jenkins provided in official documentation which one should I use. I am zeroed on docker or kubernetes. So parameters I am looking for decision are below.
portability - can be installed on any major os or cloud provider.
minimal changes to move to production.
Kubernetes is a container orchestrator that may use Docker as its container runtime. So, they are quite different things—essentially, different levels of abstraction.
You could theoretically run an application at both of these abstraction levels. Here's a comparison:
Docker
You can run an application as a Docker container on any machine that has Docker installed (i.e. any OS or cloud provider instance that supports Docker). However, you would need to implement any operations-related features that are relevant for production, such as health checks, replication, load balancing, etc. yourself.
Kubernetes
Running an application on Kubernetes requires a Kubernetes cluster. You can run a Kubernetes cluster either on-premises, in the cloud, or use a managed Kubernetes service (such as Amazon EKS, Google GKE, or Azure AKS). The big advantage of Kubernetes is that it provides all the production-relevant features mentioned above (health checks, replication, load balancing, etc.) as part of the platform. So, you don't need to implement them yourself but just use the primitives that Kubernetes provides to you.
Regarding your two requirements, Kubernetes provides both of them, while using Docker alone does not provide easy production-readiness (requirement 2). So, if you're opting for production stability, setting up a Kubernetes cluster is certainly worth the effort.

How to achieve zero cost and secure deployment option using docker?

We are building a proprietary Java application based on Docker. Right now, we are using local docker installation and development is in progress. When we want to share this application, hope this should be deployed in some docker registry. Docker registry is free and opensource? or how can I securely+freely allow my customers to access my application?.Basically, we want zero cost secure deployment option using docker.
If you're fine with putting your docker images public - you can use the docker hub.
If you want to keep it private - you can opt for one of the free private registries, e.g. treescale
See a longer list of free private registries here

Allow one private registry with docker

I need to block all registries and allow only one private registry for docker to pull images from , how can that be done natively in docker.
Using the RedHat options will not work on the upstream Docker CE or EE engine, RedHat had forked the docker engine and added their own features that are incompatible. You'll also find that /etc/sysconfig/docker is a RedHat only configuration file, designed to work with their version of the startup scripts. And I don't believe RedHat supports this old fork either, instead preferring their own podman and crio runtimes.
A hard limit on registry servers is not currently supported in the Linux Docker engine. The standard way to implement this for servers is with firewall rules on outbound connections, but that needs to only permit outbound connections to a known allow list. You still need to ensure that users don't import images from a tar file, or rebuild the otherwise blocked images from scratch (for example, all of official images on Docker Hub have the source available to rebuild them).
With Docker Desktop, the ability to restrict what registries a user can pull from has been added in their paid business tier with their image access management.
Previously I might have suggested using Notary and Docker Content Trust to ensure you only run trusted images, but that tooling has a variety of known issue, including the use of TOFU (trust on first use) that allows any image from a repo that hasn't been seen before to be signed by anyone and trusted to run. There are a few attempts to replace this, and the current leader is sigstore/cosign, but that isn't integrated directly into the docker engine. If you run in Kubernetes, this would be configured in your admission controller, like Gatekeeper or Kyverno.
Just found in redhat docs:
This can be done on docker daemon config:
/etc/sysconfig/docker
BLOCK_REGISTRY='--block-registry=all'
ADD_REGISTRY='--add-registry=registry.access.redhat.com'
and then do:
systemctl restart docker

Docker Registry vs Nexus/Artifactory

Is the 'Docker registry' in Docker engine similar to Nexus/Artifactory? What are the similarities and differences between them? If we already have Nexus, can we use it as an alternative to Docker registry and plug it into the Docker engine?
Could someone help me clear this?
A Docker registry is a repository for managing Docker images. The registry is a service of its own and not part of the Docker engine.
The registry has a similar usage to repository managers like Artifactory or Nexus, with one big difference: a repository manager will usually be able to manage repositories for different types of technologies, for example: Maven, NPM, Ruby Gems, CocoaPods, Git LFS, Python Eggs and others. A pure Docker registry will only manage Docker images.
There are couple of things you should take into consideration when choosing a tool for managing your Docker registry:
Performance - Docker images can be big. In a CI/CD environment generating large numbers of Docker images a day you need a tool that will able to deal with the load and scale as you grow. Some tools offers a clustered (HA) version which allows spreading the load between multiple nodes.
Storage management - Docker images consumes a lot of storage space. It is better to choose a tools which manages the required storage efficiently:
Supports deduplication of image layers between images and repositories
Efficiently cleans of unused image layers (garbage collection). Notice that some tools offers a stop the world GC mechanism which hurts performance.
Offers cleanup procedures/mechanisms for images which allows deleting images based on age, usage etc.
Supports multiple storage backends - file system, object storage
Support for multiple registries - some tools limits you to managing a single registry while other allows managing multiple registries in parallel. This is useful when you need to separate between snapshots and production ready images.
Support for the latest Docker version - the Docker registry API and manifests format are changing often. Make sure you choose a tool which supports all the latest changes.
Universal - If you need to manage more than Docker images, which is usually the case since you also use tools like NPM, Bower, Yum and others which also requires a registry, choose a universal repository manager which supports such technologies.
Enterprise ready - look for a tool which is enterprise ready with support for features such a LDAP connectivity, role based access control, high availability, multi site development etc.
Disclaimer: I work for JFrog the company behind Artifactory

Docker Registry vs Docker "Trusted" Registry

I just read the entire docs on securing a private Docker Registry. In addition to this, there seems to be a "Docker Trusted Registry", which is described as:
Docker Trusted Registry (DTR) lets you run and manage your own Docker image storage service, securely on your own infrastructure behind your company firewall.
Furthermore, the doc goes on to list a DTRs features:
An image registry to store, manage, and collaborate on Docker images
Pluggable storage drivers
Configuration options to let you run DTR in your particular enterprise environment.
Easy, transparent upgrades
Logging, usage and system health metrics
But doesn't the "normal" Docker Registry give me these as well?!?
Are these two things really the same, or is DTR some sort of commercialized offering of a Docker Registry? Or something else? I'm so confused!
New features in Docker Trusted Registry are:
Control access and permissions by user or organisation
Web UI to search and browse repos, manage users and setting
Integrate to CI and CD systems to automate workflows
LDAP/AD integration
Flexible storage
support User audit logs
Soft Delete image tags
Garbage collection
DTR is the paid support service for the registry - see https://hub.docker.com/enterprise/
Basically, they help you setup and will give you support down the road. It might have some niceties, otherwise you are left to your own to figure out how to run the registry.

Resources