Challenge

Find out how much you've learnt about pushing images.

We'll cover the following

Pushing an image to Docker Hub

Click on the โ€œRunโ€ button and complete the following challenge:

  1. Build and tag an image in a single command. The image and tag name should be challenge and try respectively.

  2. List down all images.

  3. Push your image to the repository.

  4. Verify on your repository that the image has been built.

  5. Run a container according to the instructions given below, using the image you built above:

    • An interactive container.
    • Should remove the container after the container stops.
    • A container named nodecontainer.
    • An exposed port of 8080.
    • Image name should be the image you built above.
  6. Click on the URL in front of โ€œYour app can be found here:โ€ to verify if your app is up successfully.

๐Ÿ“Œ To speed up the building process we have used educative1/nodehello image in Dockerfile. You can use the original Dockerfile named Dockerfile.prod if you want to. Make sure to use the -f option if you use the original.

Get hands-on with 1400+ tech skills courses.