Docker
Docker Hub

Docker Hub is a service provided by Docker for finding and sharing container images.

It's the world’s largest repository of container images with an array of content sources including container community developers, open source projects, and independent software vendors (ISV) building and distributing their code in containers.
https://docs.docker.com/docker-hub/

You can also upload your own container images to Docker Hub and then you can deploy those images to some cloud services. Below are the instructions how to deploy from Docker Hub to Render.

Deploy to Render

Render ( https://render.com/ ) is a unified cloud to build and run all your apps and websites.

You can deploy your application to Render like this:

  1. Create an account to Docker Hub
  2. Create an account to Render
  3. In Docker Desktop login to your Docker Hub
  4. In Docker Hub webpage create reporitory
  5. Create container image
  6. Tag the image
  7. Push the image to Docker Hub
  8. In Render create Webservice and connect it to your Docker Hub repo

Example

In this example the Docker Hub account is dhuser. The user has made an application like in example Node.js example. So, here are the steps in order to deploy it to Render.

  1. Create the repository in Docker Hub and in this example the name is docker_express
  2. Create the image with the command
    docker build . -t docker_express 
    
  3. Tag the image with the command
    docker tag docker_express dhuser/docker_express:t1
    
  4. Push the image to Docker Hub with the command
    docker push dhuser/docker_express:t1
    
  5. Follow the instructions from https://render.com/docs/deploy-an-image
The Image Url which have to fill in Render is docker.io/dhuser/docker_express:t1

Trigger Deploy

You can configure Render to Deploy the image automatically whenever you push a new version to Docker Hub. You can do it like this

  1. In Render open the settings of your service (example docker_express)
  2. Copy the Deploy Hook URL
  3. In Docker Hub open the Repository and click Webhooks from the menu
  4. Give some name for the New Webhook and paste the WebHook URL



Toggle Menu