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:
-
Build and tag an image in a single command. The image and tag name should be
challenge
andtry
respectively. -
List down all images.
-
Push your image to the repository.
-
Verify on your repository that the image has been built.
-
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.
-
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 namedDockerfile.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.