33[ ![ Docker Pulls] ( https://img.shields.io/docker/pulls/zenika/terraform-azure-cli.svg )] ( https://hub.docker.com/r/zenika/terraform-azure-cli/ )
44
55# Terraform and Azure CLI Docker image
6- Docker Image including Azure and Terraform CLI tools.
76
87## Availables Docker image tags
9- Repository available on the Docker Hub: [ zenika/terraform-azure-cli] ( https://hub.docker.com/r/zenika/terraform-azure-cli )
10- * zenika/terraform-azure-cli: latest - latest image build on master branch
11- * zenika/terraform-azure-cli: vX .Y - versionned image build on specific repository tag
8+ Repository available on Docker Hub: [ zenika/terraform-azure-cli] ( https://hub.docker.com/r/zenika/terraform-azure-cli )
9+
10+ One images uses [ Debian] ( https://hub.docker.com/_/debian ) and the other one uses [ Alpine] ( https://hub.docker.com/_/alpine ) as a base.
11+
12+ Debian-based images ([ debian.Dockerfile] ( https://github.com/Zenika/terraform-azure-cli/blob/master/debian.Dockerfile ) ):
13+
14+ * zenika/terraform-azure-cli: latest-latest - latest image build on master branch
15+ * zenika/terraform-azure-cli: X .Y-debian - versionned image build on repository tags
16+
17+ Alpine-based images ([ alpine.Dockerfile] ( https://github.com/Zenika/terraform-azure-cli/blob/master/alpine.Dockerfile ) ):
18+
19+ * zenika/terraform-azure-cli: alpine-latest - latest image build on master branch
20+ * zenika/terraform-azure-cli: X .Y-alpine - versionned image build on repository tags
21+
22+ > Git repository tag naming convention: ` /^([0-9.]+)$/ `
1223
1324## Motivation
1425Many Docker images including the Terraform and Azure CLI already exist out there, both on the Docker Hub and Github.
1526But they all are quite oversized.
1627
17- The goal is to create a functional, minimalist and lightweight image with these tools in order to reduce network and storage impact.
28+ The goal is to create a ** functional** , ** minimalist** and ** lightweight** image with these tools in order to reduce network and storage impact.
1829
1930## What's inside ?
20- This image uses [ Debian Stretch] ( https://hub.docker.com/_/debian ) as a base.
21-
2231Tools included:
2332
2433* Azure CLI ** v2.0.64**
@@ -32,19 +41,25 @@ Tools included:
3241## Usage
3342
3443### Launch the CLI
35- Simply launch the container and use the CLI as you would on any other platform:
44+ Simply launch the container and use the CLI as you would on any other platform, for instance using the * alpine * based image :
3645``` bash
37- docker container run -it --rm zenika/terraform-azure-cli
46+ docker container run -it --rm zenika/terraform-azure-cli:alpine-latest
3847```
3948
4049> The ` --rm ` flag will completely destroy the container and its data on exit.
4150
4251### Build the image
43- Build the image locally directly from the Dockerfile :
52+ You can build the image locally directly from the Dockerfiles :
4453``` bash
45- docker image build -t zenika/terraform-azure-cli .
54+ # build the Debian based image:
55+ docker image build -f debian.Dockerfile -t zenika/terraform-azure-cli:debian .
56+
57+ # build the Alpine based image:
58+ docker image build -f alpine.Dockerfile -t zenika/terraform-azure-cli:alpine .
4659```
4760
61+ > You can use [ Docker build arguments] ( https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg ) to set custom Terraform & Azure CLI version.
62+
4863## Roadmap & Contributions
4964Please refer to the [ github project] ( https://github.com/Zenika/terraform-azure-cli/projects/1 ) to track new features.
5065
0 commit comments