Skip to content

Commit 6e210ef

Browse files
feat(command): Add azure cli
1 parent 6dd5e41 commit 6e210ef

File tree

5 files changed

+36
-8
lines changed

5 files changed

+36
-8
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ANSIBLE_VERSION=2.12
44
ANSIBLE_BASE=alpine-3.15
55
AB_VERSION=latest
66
AWS_VERSION=2.4.24
7+
AZ_VERSION=2.34.1
78
DEFAULT_BASE_IMAGE=alpine
89
DEFAULT_BASE_IMAGE_VERSION=${ALPINE_VERSION}
910
DEFAULT_BASE=${DEFAULT_BASE_IMAGE}:${DEFAULT_BASE_IMAGE_VERSION}

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ dockerized <command>
1313
> Dockerized will also fall back to over 150 commands defined in [jessfraz/dockerfiles](https://github.com/jessfraz/dockerfiles).
1414
1515
- Cloud
16-
- [aws](apps/aws/README.md)
16+
- [aws](apps/aws/README.md)
17+
- [az](apps/az/README.md) (Azure CLI)
1718
- [doctl](apps/doctl/README.md)
1819
- [s3cmd](apps/s3cmd/README.md)
1920
- Dev-Ops & Docker

apps/az/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Dockerized az (Azure CLI)
2+
3+
```shell
4+
dockerized az
5+
```
6+
7+
## Examples
8+
9+
```shell
10+
dockerized az login # Authenticate with Azure
11+
dockerized az resource list # List resources
12+
```
13+
14+
## Volumes
15+
16+
- `~/.dockerized/apps/az` &rarr; `/root/.azure`
17+
- This directory will contain your azure profile.
18+
- You can access the directory from your host machine.

apps/doctl/Dockerfile

Whitespace-only changes.

docker-compose.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@ services:
2626
aws:
2727
image: "amazon/aws-cli:${AWS_VERSION}"
2828
volumes:
29-
- "${HOME:-}/.aws:/root/.aws"
29+
- "${HOME:-home}/.aws:/root/.aws"
3030
environment:
3131
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID:-}"
3232
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY:-}"
33+
az:
34+
image: "mcr.microsoft.com/azure-cli:${AZ_VERSION}"
35+
entrypoint: [ "az" ]
36+
volumes:
37+
- "${HOME:-home}/.ssh:/root/.ssh"
38+
- "${HOME:-home}/.dockerized/apps/az:/root/.azure"
3339
bash:
3440
image: "bash"
3541
build:
@@ -48,7 +54,7 @@ services:
4854
BUILD_SCRIPT_ARGS: "${DOCTL_VERSION}"
4955
entrypoint: [ "doctl" ]
5056
volumes:
51-
- "${HOME:-}/.dockerized/apps/doctl:/root"
57+
- "${HOME:-home}/.dockerized/apps/doctl:/root"
5258
dotnet:
5359
image: "mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-alpine"
5460
entrypoint: [ "dotnet" ]
@@ -63,7 +69,7 @@ services:
6369
BUILD_SCRIPT_ARGS: "${GH_VERSION}"
6470
entrypoint: [ "/init.sh", "/gh/bin/gh" ]
6571
volumes:
66-
- "${HOME:-}/.dockerized/apps/gh:/root"
72+
- "${HOME:-home}/.dockerized/apps/gh:/root"
6773
- "./apps/gh/init.sh:/init.sh"
6874
environment:
6975
BROWSER: "echo"
@@ -100,7 +106,7 @@ services:
100106
entrypoint: [ "node" ]
101107
volumes:
102108
- "node_modules:/usr/local/lib/node_modules"
103-
- "${HOME:-}/.dockerized/apps/node:/root"
109+
- "${HOME:-home}/.dockerized/apps/node:/root"
104110
npm:
105111
<<: *node
106112
entrypoint: [ "npm" ]
@@ -129,7 +135,7 @@ services:
129135
entrypoint: [ "python" ]
130136
volumes:
131137
- "python_modules:/usr/local/lib/python${PYTHON_VERSION}/site-packages"
132-
- "${HOME:-}/.dockerized/apps/python:/root"
138+
- "${HOME:-home}/.dockerized/apps/python:/root"
133139
python2:
134140
image: "python:${PYTHON2_VERSION}"
135141
pip:
@@ -158,12 +164,12 @@ services:
158164
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID:-}"
159165
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY:-}"
160166
volumes:
161-
- "${HOME:-}/.dockerized/apps/s3cmd:/root"
167+
- "${HOME:-home}/.dockerized/apps/s3cmd:/root"
162168
# semantic-release-cli:
163169
# <<: *node
164170
# entrypoint: [ "npx", "--package=semantic-release-cli@${SEMANTIC_RELEASE_VERSION}", "semantic-release-cli" ]
165171
# volumes:
166-
# - "${HOME:-}/.dockerized/apps/gh:/root"
172+
# - "${HOME:-home}/.dockerized/apps/gh:/root"
167173
swagger-codegen:
168174
image: "swaggerapi/swagger-codegen-cli-v3:${SWAGGER_CODEGEN_VERSION}"
169175
swipl:
@@ -209,6 +215,8 @@ services:
209215
entrypoint: [ "/usr/bin/zip" ]
210216

211217
volumes:
218+
# Default for ${HOME}. Avoids creating directories on host machine when HOME isn't set.
219+
home: {}
212220
node_modules: { }
213221
python_modules: { }
214222
pip_cache: { }

0 commit comments

Comments
 (0)