|
| 1 | +# Build Docker image |
| 2 | + |
| 3 | +**Bash** |
| 4 | +```bash |
| 5 | +$ VERSION=0.8.0 |
| 6 | +$ docker build --no-cache --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg ACSENGINE_VERSION="$VERSION" -t microsoft/acs-engine:$VERSION --file ./Dockerfile.linux . |
| 7 | +``` |
| 8 | +**PowerShell** |
| 9 | +```powershell |
| 10 | +PS> $VERSION="0.8.0" |
| 11 | +PS> docker build --no-cache --build-arg BUILD_DATE=$(Get-Date((Get-Date).ToUniversalTime()) -UFormat "%Y-%m-%dT%H:%M:%SZ") --build-arg ACSENGINE_VERSION="$VERSION" -t microsoft/acs-engine:$VERSION --file .\Dockerfile.linux . |
| 12 | +``` |
| 13 | + |
| 14 | +# Inspect Docker image metadata |
| 15 | + |
| 16 | +**Bash** |
| 17 | +```bash |
| 18 | +$ docker image inspect microsoft/acs-engine:0.8.0 --format "{{json .Config.Labels}}" | jq |
| 19 | +{ |
| 20 | + "maintainer": "Microsoft", |
| 21 | + "org.label-schema.build-date": "2017-10-25T04:35:06Z", |
| 22 | + "org.label-schema.description": "The Azure Container Service Engine (acs-engine) generates ARM (Azure Resource Manager) templates for Docker enabled clusters on Microsoft Azure with your choice of DCOS, Kubernetes, or Swarm orchestrators.", |
| 23 | + "org.label-schema.docker.cmd": "docker run -v ${PWD}:/acs-engine/workspace -it --rm microsoft/acs-engine:0.8.0", |
| 24 | + "org.label-schema.license": "MIT", |
| 25 | + "org.label-schema.name": "Azure Container Service Engine (acs-engine)", |
| 26 | + "org.label-schema.schema-version": "1.0", |
| 27 | + "org.label-schema.url": "https://github.com/Azure/acs-engine", |
| 28 | + "org.label-schema.usage": "https://github.com/Azure/acs-engine/blob/master/docs/acsengine.md", |
| 29 | + "org.label-schema.vcs-url": "https://github.com/Azure/acs-engine.git", |
| 30 | + "org.label-schema.vendor": "Microsoft", |
| 31 | + "org.label-schema.version": "0.8.0" |
| 32 | +} |
| 33 | +``` |
| 34 | + |
| 35 | +**PowerShell** |
| 36 | +```powershell |
| 37 | +PS> docker image inspect microsoft/acs-engine:0.8.0 --format "{{json .Config.Labels}}" | ConvertFrom-Json | ConvertTo-Json |
| 38 | +{ |
| 39 | + "maintainer": "Microsoft", |
| 40 | + "org.label-schema.build-date": "2017-10-25T04:35:06Z", |
| 41 | + "org.label-schema.description": "The Azure Container Service Engine (acs-engine) generates ARM (Azure Resource Manager) templates for Docker enabled clusters on Microsoft Azure with your choice of DCOS, Kubernetes, or Swarm orchestrators.", |
| 42 | + "org.label-schema.docker.cmd": "docker run -v ${PWD}:/acs-engine/workspace -it --rm microsoft/acs-engine:0.8.0", |
| 43 | + "org.label-schema.license": "MIT", |
| 44 | + "org.label-schema.name": "Azure Container Service Engine (acs-engine)", |
| 45 | + "org.label-schema.schema-version": "1.0", |
| 46 | + "org.label-schema.url": "https://github.com/Azure/acs-engine", |
| 47 | + "org.label-schema.usage": "https://github.com/Azure/acs-engine/blob/master/docs/acsengine.md", |
| 48 | + "org.label-schema.vcs-url": "https://github.com/Azure/acs-engine.git", |
| 49 | + "org.label-schema.vendor": "Microsoft", |
| 50 | + "org.label-schema.version": "0.8.0" |
| 51 | +} |
| 52 | +``` |
| 53 | + |
| 54 | +# Run Docker image |
| 55 | + |
| 56 | +``` |
| 57 | +$ docker run -v ${PWD}:/acs-engine/workspace -it --rm microsoft/acs-engine:0.8.0 |
| 58 | +``` |
0 commit comments