File: azure-linux.dockerfile

package info (click to toggle)
azure-cli 2.82.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,359,416 kB
  • sloc: python: 1,910,381; sh: 1,343; makefile: 406; cs: 145; javascript: 74; sql: 37; xml: 21
file content (21 lines) | stat: -rw-r--r-- 1,221 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------------------------------

ARG IMAGE
FROM $IMAGE

# ca-certificates: Azure Linux base image does not contain Mozilla CA certificates, install it to prevent CERTIFICATE_VERIFY_FAILED errors, see https://github.com/Azure/azure-cli/issues/26026
# jq: It's widely used for parsing JSON output in Azure CLI and has a small size. See https://github.com/Azure/azure-cli/issues/29830
RUN --mount=type=bind,target=/azure-cli.rpm,source=./docker-temp/azure-cli.rpm \
    tdnf install ca-certificates jq /azure-cli.rpm -y && \
    # Run az version to generate the commandIndex.json and speed up the following az commands
    az version && cd ~/.azure && ls | grep --invert-match commandIndex.json | xargs rm -rf && \
    tdnf clean all && rm -rf /var/cache/tdnf

# See https://github.com/Azure/azure-cli/issues/29828 for background on this
ENV AZ_BICEP_GLOBALIZATION_INVARIANT=1

ENV AZ_INSTALLER=DOCKER
CMD bash