1.docker 之 helloworld
RUN Ubuntu Docker: 15.10 / bin / echo "Hello world"
Docker to create a new image ubuntu15.10 container, and then execute bin / echo "Hello world" in the container, and then output the results.
2. Run interactive container
docker run -i -t ubuntu: 15.10 / bin / bash
two parameters -i -t ocker, so docker run container capacity "dialogue" to achieve; exit can be introduced or ctrl + d exit
3. Start container (background mode)
RUN -d Ubuntu Docker: 15.10 / bin / SH -C "to true the while; do echo Hello World; SLEEP. 1; DONE"
03c3c235f33dacfff4b5647d5e29ae4902acfed7a0e5c66fc9214d79e4cd91c0
generating container id can also be used docker ps