Sample application | Docker image file
Fortherestofthisguide,youwillbeworkingwithasimpletodolistmanagerthat’srunninginNode.js.Ifyou’renotfamiliarwithNode.js,don’tworry.Thisguidedoesn’trequireJavaScriptexperience.Tocompletethisguide,you’llneedthefollowing:GettheappBeforeyoucanruntheapplication,youneedtogettheapplicationsourcecodeontoyourmachine.Clonethegetting-startedrepository[1]usingthefollowingcommand:$gitclonehttps://github.com/docker/getting-started.gitViewthecontentsoftheclonedrepository.Insidethegetting-started/appdirectory...
For the rest of this guide, you will be working with a simple todo list manager that’s running in Node.js. If you’re not familiar with Node.js, don’t worry. This guide doesn’t require JavaScript experience.
To complete this guide, you’ll need the following:
Get the appBefore you can run the application, you need to get the application source code onto your machine.
Clone the getting-started repository[1] using the following command:
$ git clone https://github.com/docker/getting-started.gitView the contents of the cloned repository. Inside the getting-started/app directory you should see package.json and two subdirectories (src and spec).
Build the app’s container imageIn order to build the container image[2], you’ll need to use a Dockerfile. A Dockerfile is simply a text-based file with no file extension. A Dockerfile contains a script of instructions ...