This simple project show you how to create a simple image of the project by docker commands.
after installing Docker on your machine then follow this instructions:
1. Clone the project
2. Open the powershell
3. Go to the project directory
4. Write this command:
/> docker build -t hello-docker .After that the image created and you can sure about that by this command:
/> docker images5. Then run the image by this command:
/> docker run hello-dockerAny project that wants to be Dockerized needs this file.
FROM node:alpine
COPY . /app
WORKDIR /app
CMD node app.js
FROM: What container your project need to run or build
COPY: Copy all contents from root folder to 'app' folder in image's filesystem
WORKDIR: Go to 'app' directory for run commands
CMD: run the "node app.js" command