|
| 1 | +# Docker ACI Integration for Linux (Beta) |
| 2 | + |
| 3 | +Docker has extended its strategic collaboration with Microsoft to simplify code |
| 4 | +to cloud application development for developers and development teams by more |
| 5 | +closely integrating with Azure Container Instances (ACI). |
| 6 | + |
| 7 | +The new ACI experience from local VS Code and Docker Desktop development to |
| 8 | +remote deployment in ACI creates a tighter integration between Docker and |
| 9 | +Microsoft developer technologies provides the following productivity benefits to |
| 10 | +developers: |
| 11 | + |
| 12 | +* Easily log into Azure directly from the Docker CLI |
| 13 | +* Trigger an ACI cloud container service environment to be set up automatically |
| 14 | + with easy to use defaults and no infrastructure overhead |
| 15 | +* Switch from a local context to a cloud context to quickly and easily run |
| 16 | + applications |
| 17 | +* Simplifies single container and multi-container application development via |
| 18 | + the Compose specification allowing a developer to invoke fully Docker |
| 19 | + compatible commands seamlessly for the first time natively within a cloud |
| 20 | + container service |
| 21 | + |
| 22 | +> :warning: **This CLI is in beta**: The installation process, commands, and |
| 23 | +> flags will change in future releases. |
| 24 | +
|
| 25 | +## Installation |
| 26 | + |
| 27 | +This guide shows how to install the CLI for Ubuntu. For macOS and Windows, the |
| 28 | +CLI is included with the Desktop Edge release. |
| 29 | + |
| 30 | +### Prerequisites |
| 31 | + |
| 32 | +* [Docker 19.03 or later](https://docs.docker.com/get-docker/) |
| 33 | + |
| 34 | +### Install script |
| 35 | + |
| 36 | +You can install the new CLI using the install script: |
| 37 | + |
| 38 | +```console |
| 39 | +curl -L https://github.com/docker/aci-integration-beta/releases/download/v0.1.0/install.sh | sh |
| 40 | +``` |
| 41 | + |
| 42 | +### Manual install |
| 43 | + |
| 44 | +You can download the Docker ACI Integration CLI using the following command: |
| 45 | + |
| 46 | +```console |
| 47 | +curl -Lo docker-aci https://github.com/docker/aci-integration-beta/releases/download/v0.1.0/docker-linux-amd64 |
| 48 | +``` |
| 49 | + |
| 50 | +You will then need to make it executable: |
| 51 | + |
| 52 | +```console |
| 53 | +chmod +x docker-aci |
| 54 | +``` |
| 55 | + |
| 56 | +To enable using the local Docker Engine and to use existing Docker contexts, you |
| 57 | +will need to have the existing Docker CLI as `com.docker.cli` somewhere in your |
| 58 | +`PATH`. You can do this by creating a symbolic link from the existing Docker |
| 59 | +CLI. |
| 60 | + |
| 61 | +```console |
| 62 | +ln -s /path/to/existing/docker /directory/in/PATH/com.docker.cli |
| 63 | +``` |
| 64 | + |
| 65 | +> **Note**: The `PATH` environment variable is a colon separated list of |
| 66 | +> directories with priority from left to right. You can view it using |
| 67 | +> `echo $PATH`. You can find the path to the existing Docker CLI using |
| 68 | +> `which docker`. You may need root permissions to make this link. |
| 69 | +
|
| 70 | +On a fresh install of Ubuntu 20.04 with Docker Engine |
| 71 | +[already installed](https://docs.docker.com/engine/install/ubuntu/): |
| 72 | + |
| 73 | +```console |
| 74 | +$ echo $PATH |
| 75 | +/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin |
| 76 | +$ which docker |
| 77 | +/usr/bin/docker |
| 78 | +$ sudo ln -s /usr/bin/docker /usr/local/bin/com.docker.cli |
| 79 | +``` |
| 80 | + |
| 81 | +You can verify that this is working by checking that the new CLI works with the |
| 82 | +default context: |
| 83 | + |
| 84 | +```console |
| 85 | +$ ./docker-aci --context default ps |
| 86 | +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
| 87 | +$ echo $? |
| 88 | +0 |
| 89 | +``` |
| 90 | + |
| 91 | +To make this CLI with ACI integration your default Docker CLI, you must move it |
| 92 | +to a directory in your `PATH` with higher priority than the existing Docker CLI. |
| 93 | + |
| 94 | +Again on a fresh Ubuntu 20.04: |
| 95 | + |
| 96 | +```console |
| 97 | +$ which docker |
| 98 | +/usr/bin/docker |
| 99 | +$ echo $PATH |
| 100 | +/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin |
| 101 | +$ sudo mv docker-aci /usr/local/bin/docker |
| 102 | +$ which docker |
| 103 | +/usr/local/bin/docker |
| 104 | +$ docker version |
| 105 | +... |
| 106 | + Azure integration 0.1.0 |
| 107 | +... |
| 108 | +``` |
| 109 | + |
| 110 | +## Uninstall |
| 111 | + |
| 112 | +To remove this CLI, you need to remove the binary you downloaded and |
| 113 | +`com.docker.cli` from your `PATH`. If you installed using the script, this can |
| 114 | +be done as follows: |
| 115 | + |
| 116 | +```console |
| 117 | +sudo rm /usr/local/bin/docker /usr/local/bin/com.docker.cli |
| 118 | +``` |
0 commit comments