DockerHub and Dockerfile


Link DockerHub with local

  1. Sign up and in to Docker Hub.
  2. Create a Repo on the Docker Hub.
  3. Name it as zcemycl/ubuntu-nodejs, set to public. (free account)
  4. Log in Dockerhub connection by, docker login, then type your username zcemycl and password.
  5. Create a dockerfile named Dockerfile.
  6. 
    FROM busybox
    CMD echo "Hello world! This is my first Docker image."
        
  7. Build Docker Image. docker build -t zcemycl/ubuntu-nodejs .
  8. Test Docker Image. docker run zcemycl/ubuntu-nodejs
  9. Push Docker Image to Docker Hub. docker push zcemycl/ubuntu-nodejs
  10. You should now see the changes in dockerhub repo.

References