[Compose] Update to v1.24.1

Signed-off-by: khs1994 <khs1994@khs1994.com>
pull/420/head
khs1994 2019-09-01 14:46:33 +08:00
parent 6bca9e8dff
commit 7ec38273bb
7 changed files with 64 additions and 77 deletions

View File

@ -21,11 +21,11 @@ about: Create a report to help us improve
* [x] Others (Pls describe below)
### Docker Version
<!-- Docker 18.09 Docker -->
<!--if Docker version under 18.09, please upgrade Docker to 18.09-->
<!-- Docker 19.03 Docker -->
<!--if Docker version under 19.03, please upgrade Docker to 19.03-->
* [x] Edge (v18.09)
* [x] Stable (v18.09)
* [x] Edge (v19.03)
* [x] Stable (v19.03)
* [x] 1.13.0 or Before
### Problem Description

View File

@ -21,11 +21,11 @@ about: Create a issue about Docker
* [x] Others (Pls describe below)
### Docker Version
<!-- Docker 18.09 Docker -->
<!--if Docker version under 18.09, please upgrade Docker to 18.09-->
<!-- Docker 19.03 Docker -->
<!--if Docker version under 19.03, please upgrade Docker to 19.03-->
* [x] Edge (v18.09)
* [x] Stable (v18.09)
* [x] Edge (v19.03)
* [x] Stable (v19.03)
* [x] 1.13.0 or Before
### Problem Description

View File

@ -1,6 +1,7 @@
## Compose
###
Compose
`docker-compose [COMMAND] --help` `docker-compose help [COMMAND]` 使
@ -66,6 +67,7 @@ docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
Compose
#### `kill`
`docker-compose kill [options] [SERVICE...]`
`SIGKILL`
@ -77,6 +79,7 @@ $ docker-compose kill -s SIGINT
```
#### `logs`
`docker-compose logs [options] [SERVICE...]`
docker-compose 使 `--no-color`
@ -84,11 +87,13 @@ $ docker-compose kill -s SIGINT
#### `pause`
`docker-compose pause [SERVICE...]`
#### `port`
`docker-compose port [options] SERVICE PRIVATE_PORT`
@ -100,6 +105,7 @@ $ docker-compose kill -s SIGINT
* `--index=index` 1
#### `ps`
`docker-compose ps [options] [SERVICE...]`
@ -109,6 +115,7 @@ $ docker-compose kill -s SIGINT
* `-q` ID
#### `pull`
`docker-compose pull [options] [SERVICE...]`
@ -122,6 +129,7 @@ $ docker-compose kill -s SIGINT
Docker
#### `restart`
`docker-compose restart [options] [SERVICE...]`
@ -131,6 +139,7 @@ $ docker-compose kill -s SIGINT
* `-t, --timeout TIMEOUT` 10
#### `rm`
`docker-compose rm [options] [SERVICE...]`
`docker-compose stop`
@ -195,6 +204,7 @@ $ docker-compose run --no-deps web python manage.py shell
* `-T` tty tty
#### `scale`
`docker-compose scale [options] [SERVICE=NUM...]`
@ -214,11 +224,13 @@ $ docker-compose scale web=3 db=2
* `-t, --timeout TIMEOUT` 10
#### `start`
`docker-compose start [SERVICE...]`
#### `stop`
`docker-compose stop [options] [SERVICE...]`
`docker-compose start`
@ -232,11 +244,13 @@ $ docker-compose scale web=3 db=2
#### `unpause`
`docker-compose unpause [SERVICE...]`
#### `up`
`docker-compose up [options] [SERVICE...]`
@ -270,6 +284,11 @@ $ docker-compose scale web=3 db=2
* `-t, --timeout TIMEOUT` 10
#### `version`
`docker-compose version`
###
* [](https://docs.docker.com/compose/reference/overview/)

View File

@ -18,7 +18,7 @@ services:
`image` `build` Dockerfile
使 `build` `Dockerfile` (`CMD`, `EXPOSE`, `VOLUME`, `ENV` ) `docker-compose.yml`
使 `build` `Dockerfile` (`CMD`, `EXPOSE`, `VOLUME`, `ENV` ) `docker-compose.yml`
@ -460,7 +460,7 @@ sysctls:
### `volumes`
宿 `HOST:CONTAINER` 访 `HOST:CONTAINER:ro`
宿(`HOST:CONTAINER`)(`VOLUME:CONTAINER`)访 `HOST:CONTAINER:ro`
@ -471,6 +471,21 @@ volumes:
- ~/configs:/etc/configs/:ro
```
```yaml
version: "3"
services:
my_src:
image: mysql:8.0
volumes:
- mysql_data:/var/lib/mysql
volumes:
mysql_data:
```
###
`domainname, entrypoint, hostname, ipc, mac_address, privileged, read_only, shm_size, restart, stdin_open, tty, user, working_dir` `docker run`
@ -557,3 +572,7 @@ MONGO_VERSION=3.6
```
`docker-compose up` `mongo:3.6`
###
* [](https://docs.docker.com/compose/compose-file/)

View File

@ -4,14 +4,12 @@
`Compose` Python `pip` 使 Docker
使
`Docker for Mac` `Docker for Windows` `docker-compose` Docker 使
`Docker Desktop` `docker-compose` Docker 使
```bash
$ docker-compose --version
docker-compose version 1.17.1, build 6d101fb
docker-compose version 1.24.1, build 4667896b
```
Linux 使
@ -23,7 +21,8 @@ Linux 系统请使用以下介绍的方法安装。
Linux 64
```bash
$ sudo curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
$ sudo curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
```
@ -43,7 +42,7 @@ $ sudo pip install -U docker-compose
```bash
Collecting docker-compose
Downloading docker-compose-1.17.1.tar.gz (149kB): 149kB downloaded
Downloading docker-compose-1.24.1.tar.gz (149kB): 149kB downloaded
...
Successfully installed docker-compose cached-property requests texttable websocket-client docker-py dockerpty six enum34 backports.ssl-match-hostname ipaddress
```
@ -51,66 +50,9 @@ Successfully installed docker-compose cached-property requests texttable websock
### bash
```bash
$ curl -L https://raw.githubusercontent.com/docker/compose/1.8.0/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
$ curl -L https://raw.githubusercontent.com/docker/compose/1.24.1/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
```
###
Compose Python
```bash
$ curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
```
`run.sh`
```bash
set -e
VERSION="1.8.0"
IMAGE="docker/compose:$VERSION"
# Setup options for connecting to docker host
if [ -z "$DOCKER_HOST" ]; then
DOCKER_HOST="/var/run/docker.sock"
fi
if [ -S "$DOCKER_HOST" ]; then
DOCKER_ADDR="-v $DOCKER_HOST:$DOCKER_HOST -e DOCKER_HOST"
else
DOCKER_ADDR="-e DOCKER_HOST -e DOCKER_TLS_VERIFY -e DOCKER_CERT_PATH"
fi
# Setup volume mounts for compose config and context
if [ "$(pwd)" != '/' ]; then
VOLUMES="-v $(pwd):$(pwd)"
fi
if [ -n "$COMPOSE_FILE" ]; then
compose_dir=$(dirname $COMPOSE_FILE)
fi
# TODO: also check --file argument
if [ -n "$compose_dir" ]; then
VOLUMES="$VOLUMES -v $compose_dir:$compose_dir"
fi
if [ -n "$HOME" ]; then
VOLUMES="$VOLUMES -v $HOME:$HOME -v $HOME:/root" # mount $HOME in /root to share docker.config
fi
# Only allocate tty if we detect one
if [ -t 1 ]; then
DOCKER_RUN_OPTIONS="-t"
fi
if [ -t 0 ]; then
DOCKER_RUN_OPTIONS="$DOCKER_RUN_OPTIONS -i"
fi
exec docker run --rm $DOCKER_RUN_OPTIONS $DOCKER_ADDR $COMPOSE_OPTIONS $VOLUMES -w "$(pwd)" $IMAGE "$@"
```
`docker/compose`
###

View File

@ -44,11 +44,11 @@ $ brew cask install docker
```bash
$ docker --version
Docker version 18.09.0, build 4d60db4
Docker version 19.03.1, build 74b1e89
$ docker-compose --version
docker-compose version 1.23.2, build 1110ad01
docker-compose version 1.24.1, build 4667896b
$ docker-machine --version
docker-machine version 0.16.0, build 702c267f
docker-machine version 0.16.1, build cce350d7
```
`docker version``docker info` [Nginx ](https://hub.docker.com/_/nginx/)

7
manifest 100644
View File

@ -0,0 +1,7 @@
DOCKER_VERSION=19.03.1
DOCKER_COMPOSE_VERSION=1.24.1
DOCKER_MACHINE_VERSION=0.13.0
ETCD_VERSION=3.4.0
KUBERNETES_VERSION=1.14.3
UBUNTU=18.04
DEBIAN=9