Exercise Solution
In this lesson, we will go over the step-by-step solution for the exercise: Enable an Image to Be Parameterized.
- Create a file named Dockerfile and add the following code to it:
-
Open a command-line. Change the current directory to the directory where you created the Dockerfile and the compute.js file.
-
The following command will build your docker image.
- Run the following command once the image has been built, it will start the container and run your images.
Run the following to observe the output of docker run --rm jsparam
command.
/
Dockerfile
compute.js
- compute.js
Run the following to observe the output of docker run --rm -e diameter=5.0 jsparam
command.
/
Dockerfile
compute.js
- Dockerfile
In the next lesson, we will look at a special type of storage.
Exercise: Enable an Image to Be Parameterized
Storage
Mark as Completed
Report an Issue