service docker start
docker ps
docker images
usermod -aG docker ncs
docker run
docker run ubuntu echo hello docker
docker run -p 8080:80 -d nginx
cat index.html
docker cp index.html ed3be89864a3://usr/share/nginx/html
docker commit -m ‘fun’ 74fcb0f7e815 nginx-fun
#dockerfile
FROM alpine:latest
MAINTAINER ncs
CMD echo 'hello docker'
cp Dockerfile ./d1
docker build -t hello_docker .
FROM ubuntu
MAINTAINER ncs
RUN apt-get update
RUN apt-get install -y nginx
COPY index.html /var/www/html
ENTRYPOINT ["/usr/sbin/nginx", "-g", "daemon off;"]
EXPOSE 80
docker build -t ncs/hello-nginx1 .
docker run -d -p 80:80 ncs/hello-nginx1
curl http://localhost