Exopods Docs
DashboardPricing
  • Getting Started
    • Introduction
  • Knowledge Base
    • Supported Apps
    • Terms/Misc
    • Understand Pricing
    • Why Exopods?
  • Tutorials
    • Getting Started
      • How to Deploy Docker Apps on Exopods?
      • How to deploy Github Project on Exopods?
    • Deploy docker images using private registries
      • AWS ECR
      • Google GCR
      • JFrog
      • Dockerhub
    • Deploy your web app on Exopods
      • Effortless deploy React apps with Exopods
      • Deploy Node.js application using Exopods
    • Deploy One Click Templates
      • Grafana Template deployment on Exopods
      • Deploying portainer in Exopods
      • Deploying Gitea template on Exopods
  • News
    • What's new in Exopods?
  • help and support
    • Common Issues?
  • knowledge share
    • Managed K8s Vs Exopods?
    • How to configure SSL in Exopods?
Powered by GitBook
On this page
  • Prerequisites
  • How to get Secret for DockerHub
  • Configure Docker Image
  • Enable Private Registry
  • Select/Create Docker Pull Secrets
  • Test and Configure
  • Configure Deployment
  • Deploy
  • Conclusion
  1. Tutorials
  2. Deploy docker images using private registries

Dockerhub

This page provides a step-by-step guide on configuring and deploying a Docker image from Docker Hub. It covers essential prerequisites, Docker Hub configuration, deployment settings, and testing.

PreviousJFrogNextDeploy your web app on Exopods

Last updated 9 months ago

Prerequisites

  • A Docker Account: Sign up for a free Docker account at .

  • Docker Desktop: Download and install Docker Desktop for your operating system from .

  • A Docker Image: Have your Docker image already built and pushed to a Docker Hub repository. You can find resources for building Docker images in the Docker documentation:

  • Docker Hub Repository: Create a repository on Docker Hub to store your image. You can do this through your Docker account dashboard.

  • Docker Hub Credentials: You'll need either your Docker Hub username and password or a personal access token to authenticate and pull the image from a private repository. You can create a personal access token in your Docker account settings.

  • Docker Pull Secret: This is not mandatory for public repositories, but recommended for private repositories to securely store your credentials.

How to get Secret for DockerHub

Option 1:

  1. Create a Personal Access Token:

    • Log in to your Docker Hub account.

    • Go to your account settings.

    • Under "Security," click on "Personal access tokens."

    • Create a new token, specifying the necessary scopes (e.g., "read:org," "read:repo," "pull:registry").

    • Copy the generated token.

  2. Use the Token as a Secret:

    • In your deployment configuration, use the personal access token as the value for the "Password" field.

    • Ensure that the secret is stored securely to prevent unauthorized access.

Option 2:

If you prefer to use a Docker Hub username and password directly, you can:

  1. Create a Docker Hub Pull Secret:

    • Use the docker secret create command in your terminal or command prompt.

    • Specify a secret name and provide your username and password as base64-encoded values.

Example:

docker secret create my-dockerhub-secret --from-env DOCKER_HUB_USERNAME=your_username DOCKER_HUB_PASSWORD=$(echo your_password | base64)

Note: Using a personal access token is generally considered more secure as it allows you to limit the scope of permissions granted to the token.

Configure Docker Image

  1. Deployment Name: Provide a unique name for your deployment.

  2. Docker Repo/Registry URL: Enter the URL of your Docker Hub repository. For Docker Hub, this usually follows the format: docker.io/username/repo-name.

  3. Image Tag: Enter the image tag (e.g., latest, or any specific version tag of your image).

Enable Private Registry

If your Docker Hub repository is private, toggle the Private Registry option to enable pulling from a private Docker Hub repository.

Select/Create Docker Pull Secrets

  1. Select Secret: Choose Docker Hub from the dropdown under the "Select Secret" option.

  2. Add New Secret: If no Docker Hub credentials are stored yet, click Add new and perform the following:

    • Registry Provider: Select Docker Hub.

    • Secret Name: Provide a custom name for the secret (e.g., DockerHub_Pull_Secret).

    • Repo URL: Enter your Docker Hub repository URL.

    • Username: Enter your Docker Hub username.

    • Email: Enter your email associated with the Docker Hub account.

    • Password: Provide your Docker Hub password or personal access token.

  3. Submit Secret: Once the secret is filled, click Submit to add the Docker Hub pull secret

Test and Configure

  1. Test Connection: After the secrets are configured, click Test to verify the connection with your Docker Hub repository.

  2. Registry Provider Selection: Select Docker Hub as the Registry Provider from the list.

  3. Repo URL, Username, Email, Password: Confirm and re-enter the following details if necessary:

    • Repo URL (your Docker Hub repository URL)

    • Username: Your Docker Hub username

    • Email: Your Docker Hub account email

    • Password: Your Docker Hub password or token

  4. Continue: If the test is successful, click Continue to finalize the Docker image configuration.

Configure Deployment

Once the Docker image is successfully configured, proceed to the deployment settings.

Configure Deployment Details:

  1. Port Mapping: Define the ports required for your application.

  2. Command and Arguments: Set custom Docker commands and arguments (if any) to run when the container starts.

  3. Environment Variables: Specify any environment variables needed for the container's runtime.

  4. Pricing/Resource Allocation: Configure the resource allocation (e.g., CPU, RAM) and select a pricing tier that suits your deployment.

Deploy

Once all configurations are in place, click Deploy to launch your containerized application from Docker Hub. The system will now pull the Docker image from Docker Hub (public or private based on the repository) and deploy it.


Conclusion

By following these steps, you have successfully configured a Docker image from Docker Hub and deployed it. After reviewing your deployment setup, you are now able to run your containerized application smoothly on the selected infrastructure, with a simple and user-friendly experience for developers at all levels.

https://www.docker.com/
https://www.docker.com/products/docker-desktop/
https://docs.docker.com/reference/cli/docker/buildx/build/