Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{Packaging} Accelerate command execution in Docker image with warm start #30643

Merged
merged 3 commits into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion azure-linux.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ 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 && tdnf clean all && rm -rf /var/cache/tdnf
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
Expand Down