Skip to content

Commit

Permalink
Docker image moved to microsoft/azure-cli (Azure#5291)
Browse files Browse the repository at this point in the history
* Docker image moved to microsoft/azure-cli

* minor change to main readme

* Address CR feedback

* Format fix
  • Loading branch information
derekbekoe authored Jan 13, 2018
1 parent 86cb51b commit e20383c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LABEL maintainer="Microsoft" \
org.label-schema.usage="https://docs.microsoft.com/en-us/cli/azure/install-az-cli2#docker" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/Azure/azure-cli.git" \
org.label-schema.docker.cmd="docker run -v \${HOME}/.azure:/root/.azure -it azuresdk/azure-cli-python:$CLI_VERSION"
org.label-schema.docker.cmd="docker run -v \${HOME}/.azure:/root/.azure -it microsoft/azure-cli:$CLI_VERSION"

WORKDIR azure-cli
COPY . /azure-cli
Expand Down
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,19 @@ To provide feedback from the command line, try the `az feedback` command.

### Docker

**This install does not support the component feature.**

We maintain a Docker image preconfigured with the Azure CLI. Run the latest automated Docker build with the command below.
We maintain a Docker image preconfigured with the Azure CLI.
See our [Docker tags](https://hub.docker.com/r/microsoft/azure-cli/tags/) for available versions.

```bash
$ docker run -v ${HOME}:/root -it azuresdk/azure-cli-python:latest
$ docker run -v ${HOME}:/root -it microsoft/azure-cli:<version>
```

All command modules are included in this version as the image is built directly from the Git repository.
You can also get a specific version of Azure CLI 2.0 via Docker.

For automated builds triggered by pushes to this repo, see [azuresdk/azure-cli-python](https://hub.docker.com/r/azuresdk/azure-cli-python/tags).
For example:
```bash
$ docker run -v ${HOME}:/root -it azuresdk/azure-cli-python:<version>
docker run -v ${HOME}:/root -it azuresdk/azure-cli-python:dev
```

See our [Docker tags](https://hub.docker.com/r/azuresdk/azure-cli-python/tags/) for available versions.

### Edge Builds

If you want to get the latest build from the master branch, you can use our "edge" builds feed. Here's an example of
Expand Down
12 changes: 6 additions & 6 deletions build_scripts/docker/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Docker Packaging
================

The Docker image is available at https://hub.docker.com/r/azuresdk/azure-cli-python/tags/.
The Docker image is available at https://hub.docker.com/r/microsoft/azure-cli/tags/.

Updating the Docker image
-------------------------
1. Run `docker build` with the Dockerfile.
When tagging this Docker image, choose an appropriate version number.
e.g.: ``sudo docker build --no-cache --build-arg BUILD_DATE="`date -u +"%Y-%m-%dT%H:%M:%SZ"`" --build-arg CLI_VERSION=${CLI_VERSION} -f Dockerfile -t azuresdk/azure-cli-python:${CLI_VERSION} .``
e.g.: ``sudo docker build --no-cache --build-arg BUILD_DATE="`date -u +"%Y-%m-%dT%H:%M:%SZ"`" --build-arg CLI_VERSION=${CLI_VERSION} -f Dockerfile -t microsoft/azure-cli:${CLI_VERSION} .``
2. Push the image to the registry,
e.g.: `sudo docker push azuresdk/azure-cli-python:${CLI_VERSION}`
e.g.: `sudo docker push microsoft/azure-cli:${CLI_VERSION}`
3. Create a PR to commit the Dockerfile changes back to the repository.


Expand All @@ -19,17 +19,17 @@ Verification
Run the image.

```
$ docker run -it azuresdk/azure-cli-python:${CLI_VERSION}
$ docker run -it microsoft/azure-cli:${CLI_VERSION}
$ az
$ az --version
```

Save the image
```
docker save -o docker-azuresdk-azure-cli-python-VERSION.tar azuresdk/azure-cli-python:${CLI_VERSION}
docker save -o docker-microsoft-azure-cli-VERSION.tar microsoft/azure-cli:${CLI_VERSION}
```

Load the saved image
```
docker load -i docker-azuresdk-azure-cli-python-VERSION.tar
docker load -i docker-microsoft-azure-cli-VERSION.tar
```

0 comments on commit e20383c

Please sign in to comment.