Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Basic Commands for DockerFile:
- FROM node:10
- WORKDIR /app
- COPY package.json /app
- RUN npm install
- COPY . /app
- EXPOSE 3000
- CMD npm start
- Command to convert the node app to a docker image:
- > docker build ./
- this will run the DockerFile and path of ./ or any PATH should point towards the DockerFile this will output the Image file.
- We can give tags also which will be easy to identify the Docker Files
- > docker build ./ -t myapp
- this will give output:
- Successfully built b1bff2dcdbc7
- Successfully tagged myapp:latest
- check in docker images
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement