mirror of https://github.com/docker/compose.git
Apply suggestions from code review
Co-authored-by: Chris Crone <christopher.crone@docker.com> Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
parent
e705d4915c
commit
6a4d14e03d
|
@ -57,7 +57,7 @@ __Legend:__
|
|||
| service.network_mode | x |
|
||||
| service.networks | x | Communication between services is implemented by defining mapping for each service in the shared `/etc/hosts` file of the container group. Each service can resolve names for other services and the resulting network calls will be redirected to `localhost`.
|
||||
| service.pid | x |
|
||||
| service.ports | ✓ | Only symetrical por mapping is supported in ACI. See [Exposing ports](#exposing-ports).
|
||||
| service.ports | ✓ | Only symetrical port mapping is supported in ACI. See [Exposing ports](#exposing-ports).
|
||||
| service.secrets | ✓ | See [Secrets](#secrets).
|
||||
| service.security_opt | x |
|
||||
| service.stop_grace_period | x |
|
||||
|
@ -85,7 +85,7 @@ __Legend:__
|
|||
## Logs
|
||||
|
||||
Container logs can be obtained for each container with `docker logs <CONTAINER>`.
|
||||
The Docker ACI integration does not currently support aggregated logs for containers in a compose application,
|
||||
The Docker ACI integration does not currently support aggregated logs for containers in a Compose application,
|
||||
due to ACI not providing either aggregated logs for a container group, or log timestamps that can be easily used to reorder logs properly for display.
|
||||
|
||||
## Exposing ports
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Azure Container Instances: running single containerrs
|
||||
|
||||
Single containes can be executed on ACI with the `docker run` command.
|
||||
Single containers can be executed on ACI with the `docker run` command.
|
||||
A single container is executed in its own ACI container group, that will container only one container.
|
||||
|
||||
Containers can be listed with the `docker ps` command, and stopped and removed with `docker stop <CONTAINER>` and `docker rm <CONTAINER>`.
|
||||
|
@ -24,27 +24,27 @@ __Legend:__
|
|||
| --envFile | ✓ | Sets environment variable from and external file
|
||||
| -l, --label | x | Unsupported in Docker ACI integration, due to limitations of ACI Tags
|
||||
| -m, --memory | ✓ | See [Container Resources](#container-resources)
|
||||
| --name | ✓ | provide a name for the container. Name must be unique withing the ACI resource group. a name is generated by default.
|
||||
| -p, --publish | ✓ | See [Exposing ports](#exposing-ports). Only symetrical por mapping is supported in ACI.
|
||||
| --name | ✓ | Provide a name for the container. Name must be unique withing the ACI resource group. a name is generated by default.
|
||||
| -p, --publish | ✓ | See [Exposing ports](#exposing-ports). Only symetrical port mapping is supported in ACI.
|
||||
| --restart | ✓ | Restart policy, must be one of: `any`, `none`, `on-failure`.
|
||||
| --rm | x | Not supported as [ACI does not support auto-delete containers](https://feedback.azure.com/forums/602224-azure-container-instances/suggestions/34066633-support-auto-delete-of-aci-when-container-exits-no)
|
||||
| -v, --volume | ✓ | See [Persistent Volumes](#persistent-volumes)
|
||||
|
||||
## Exposing ports
|
||||
|
||||
You can expose one or several port of a container with `docker run -p <PORT>:<PORT>`
|
||||
If exposing port(s) when running a container, the corresponding ACI container group will be exposed with a public IP allocated and the required port(s) accessible.
|
||||
You can expose one or more ports of a container with `docker run -p <PORT>:<PORT>`
|
||||
If ports are exposed when running a container, the corresponding ACI container group will be exposed with a public IP allocated and the required port(s) accessible.
|
||||
> Note: [ACI does not support port mapping](https://feedback.azure.com/forums/602224-azure-container-instances/suggestions/34082284-support-for-port-mapping), so the same port number must be specified when using `-p <PORT>:<PORT>`.
|
||||
|
||||
When exposing ports, a container can also specify the service `--domainname` flag to set a DNS hostname. `domainname` will be used to specify the ACI DNS Label Name, and the ACI container group will be reachable at `<domainname>.<region>.azurecontainer.io`.
|
||||
`domainname` must be unique globally in <region>.azurecontainer.io
|
||||
When exposing ports, a container can also specify the service `--domainname` flag to set a DNS hostname. `domainname` will be used to specify the ACI DNS Label Name, and the ACI container group will be reachable at `<DOMAINNANE>.<REGION>.azurecontainer.io`.
|
||||
`domainname` must be unique globally in <REGION>.azurecontainer.io
|
||||
|
||||
## Persistent volumes
|
||||
|
||||
Docker volumes are mapped to Azure File shares, each file share is part of an Azure Storage Account.
|
||||
Volume(s) can be specified with `docker run -v <STORAGE-ACCOUNT>/<FILESHARE>:<TARGET-PATH>`.
|
||||
One or more volumes can be specified with `docker run -v <STORAGE-ACCOUNT>/<FILESHARE>:<TARGET-PATH>`.
|
||||
|
||||
A run command can use the `-- volume`flag several times for different volumes, several volumes can use the same or different storage accounts. Tagret path for different volume mounts must be different and not overlap.
|
||||
A run command can use the `--volume` or `-v` flag several times for different volumes. The volumes can use the same or different storage accounts. The target paths for different volume mounts must be different and not overlap.
|
||||
There is no support for mounting a single file, or mounting a subfolder from an Azure File Share.
|
||||
|
||||
Credentials for storage accounts will be automatically fetched at deployment time using the Azure login to retrieve the storage account key for each storage account used.
|
||||
|
@ -53,16 +53,13 @@ Credentials for storage accounts will be automatically fetched at deployment tim
|
|||
|
||||
CPU and memory reservations can be set when running containers with `docker run --cpus 1.5 --memory 2G`.
|
||||
|
||||
It is not possible to set resource limits different than resource reservation on single containers.
|
||||
ACI allows setting resource limits for containers in a container group, but these limits must stay within the reserved resources for the entire group. In the case of a single container deployed in a container group, resource limits must be equal to resource reservation.
|
||||
It is not possible to set resource limits that differ from resource reservation on single containers.
|
||||
ACI allows setting resource limits for containers in a container group but these limits must stay within the reserved resources for the entire group. In the case of a single container deployed in a container group, the resource limits must be equal to the resource reservation.
|
||||
|
||||
## Logs
|
||||
|
||||
You can view container logs with the command:
|
||||
```
|
||||
docker logs <CONTAINER-ID>
|
||||
```
|
||||
You can view container logs with the command `docker logs <CONTAINER-ID>`.
|
||||
|
||||
You can follow logs with the `--follow` (`-f`) option.
|
||||
When running a container with `docker run`, by default the command line stays attached to container logs when the container starts. Use `docker run --detach` to not follow logs once the container starts.
|
||||
> Note: following ACI logs might have display issues especialy when resizing a terminal that is following container logs. This is due to ACI providing raw log pullling but no streaming of logs. Logs are effectively pulled every 2 seconds when following logs.
|
||||
> Note: Following ACI logs may have display issues especially when resizing a terminal that is following container logs. This is due to ACI providing raw log pulling but no streaming of logs. Logs are effectively pulled every 2 seconds when following logs.
|
||||
|
|
Loading…
Reference in New Issue