Two docker install applications

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

4. The container log docker logs container id

Stop the container docker stop container id

5.docker client

Guess you like

Origin www.cnblogs.com/shaoqihao/p/12061804.html