2017-11-21 19:05:06 +08:00
|
|
|
|
version: "3"
|
|
|
|
|
services:
|
|
|
|
|
|
2018-01-23 21:34:32 +08:00
|
|
|
|
# $ docker-compose up server => up a server,Only Support Linux or macOS
|
|
|
|
|
|
2017-11-28 13:38:13 +08:00
|
|
|
|
server:
|
2017-11-23 09:42:22 +08:00
|
|
|
|
image: yeasy/docker_practice:latest
|
2017-11-21 19:05:06 +08:00
|
|
|
|
ports:
|
|
|
|
|
- 4000:4000
|
|
|
|
|
volumes:
|
|
|
|
|
- ./:/srv/gitbook-src
|
|
|
|
|
command: server
|
2017-11-28 11:59:21 +08:00
|
|
|
|
|
2018-01-23 21:34:32 +08:00
|
|
|
|
# $ docker-compose up build => build gitbook
|
2017-11-28 13:38:13 +08:00
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
image: yeasy/docker_practice:latest
|
|
|
|
|
volumes:
|
|
|
|
|
- ./:/srv/gitbook-src
|
|
|
|
|
command: build
|
|
|
|
|
|
2018-01-23 21:34:32 +08:00
|
|
|
|
# $ docker run -it --rm -p 4000:80 dockerpracticecn/docker_practice
|
|
|
|
|
|
|
|
|
|
# $ docker up offline
|
|
|
|
|
|
|
|
|
|
offline:
|
|
|
|
|
# this image build by travis ci
|
|
|
|
|
image: dockerpracticecn/docker_practice
|
|
|
|
|
ports:
|
|
|
|
|
- 4000:80
|
|
|
|
|
|
|
|
|
|
# developer test docker image
|
|
|
|
|
|
2017-11-28 13:38:13 +08:00
|
|
|
|
development:
|
|
|
|
|
build: ./.travis
|
2017-12-10 12:53:57 +08:00
|
|
|
|
image: yeasy/docker_practice:latest
|
2017-11-28 13:38:13 +08:00
|
|
|
|
ports:
|
|
|
|
|
- 4000:4000
|
|
|
|
|
volumes:
|
|
|
|
|
- ./:/srv/gitbook-src
|
|
|
|
|
command: server
|
2017-11-29 10:35:57 +08:00
|
|
|
|
# command: build
|