Search⌘ K
AI Features

Exercise Solution

Explore how to create a Dockerfile and use command-line tools to build your Docker image. Understand the steps to run a container from your image and check its output. This lesson prepares you to manage Docker images and containers confidently as part of your development workflow.

We'll cover the following...
  • Create a file named Dockerfile and add the following code to it:
Shell
FROM node:11-alpine
COPY compute.js .
CMD node compute.js
  • Open a command-line. ...