This shows you the differences between two versions of the page.
ii:labs:s2:04:tasks:03 [2024/04/11 12:44] radu.ciobanu |
ii:labs:s2:04:tasks:03 [2024/04/11 13:09] (current) radu.ciobanu [03. [30p] Writing a Dockerfile] |
||
---|---|---|---|
Line 3: | Line 3: | ||
== Subtasks == | == Subtasks == | ||
- | - go to the //**node_app**// folder from the {{:ii:labs:s2:03:tasks:lab3.zip|lab archive}}, which contains the source files for a simple NodeJS application | + | - go to the //**node_app**// folder from the {{:ii:labs:s2:04:lab4_docker.zip|lab archive}}, which contains the source files for a simple NodeJS application |
- write a Dockerfile that will be used to create an image by following the steps below: | - write a Dockerfile that will be used to create an image by following the steps below: | ||
- | - start **//from//** the latest version of the official NodeJS image, **//node:15.11.0-stretch//** | + | - start **//from//** the latest version of the official NodeJS image, **//node:21-alpine3.18//** |
- **//copy//** the file **//package.json//** from the local host to the current directory in the new image (./); this file is intended to specify the dependencies of the NodeJS application (for example, the Express.js framework) | - **//copy//** the file **//package.json//** from the local host to the current directory in the new image (./); this file is intended to specify the dependencies of the NodeJS application (for example, the Express.js framework) | ||
- **//run//** the command **//npm install//** to install the dependencies in the file from the previous step | - **//run//** the command **//npm install//** to install the dependencies in the file from the previous step |