Create Docker Container from Dockerfile

$ docker pull node


$ docker image ls | grep node


$ mkdir -p ~/dockerfiles
$ cd ~/dockerfiles


$ vi nodejs.dockerfile


1
2
3
4
5
6
7
8
FROM node:latest

RUN apt-get update
RUN apt-get install -y vim git curl net-tools


USER root
CMD ["bash"]


$ docker build -f nodejs.dockerfile -t marley/nodejs .


$ docker image ls | grep marley/nodejs
marley/nodejs               latest              798c422b32ac        41 seconds ago      717MB