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} Fix jp download url in ARM64 docker image #27269

Merged
merged 5 commits into from
Sep 12, 2023

Conversation

bebound
Copy link
Contributor

@bebound bebound commented Aug 28, 2023

Description

The url link in ARM64 should be updated.

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Aug 28, 2023

️✔️AzureCLI-FullTest
️✔️acr
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️acs
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.10
️✔️3.9
️✔️ams
️✔️latest
️✔️3.10
️✔️3.9
️✔️apim
️✔️latest
️✔️3.10
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.10
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.10
️✔️3.9
️✔️aro
️✔️latest
️✔️3.10
️✔️3.9
️✔️backup
️✔️latest
️✔️3.10
️✔️3.9
️✔️batch
️✔️latest
️✔️3.10
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.10
️✔️3.9
️✔️billing
️✔️latest
️✔️3.10
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.10
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.10
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.10
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.10
️✔️3.9
️✔️config
️✔️latest
️✔️3.10
️✔️3.9
️✔️configure
️✔️latest
️✔️3.10
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.10
️✔️3.9
️✔️container
️✔️latest
️✔️3.10
️✔️3.9
️✔️core
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.10
️✔️3.9
️✔️databoxedge
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️dla
️✔️latest
️✔️3.10
️✔️3.9
️✔️dls
️✔️latest
️✔️3.10
️✔️3.9
️✔️dms
️✔️latest
️✔️3.10
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.10
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.10
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.10
️✔️3.9
️✔️find
️✔️latest
️✔️3.10
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.10
️✔️3.9
️✔️identity
️✔️latest
️✔️3.10
️✔️3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️keyvault
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️kusto
️✔️latest
️✔️3.10
️✔️3.9
️✔️lab
️✔️latest
️✔️3.10
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.10
️✔️3.9
️✔️maps
️✔️latest
️✔️3.10
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.10
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.10
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.10
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.10
️✔️3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.10
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.10
️✔️3.9
️✔️profile
️✔️latest
️✔️3.10
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.10
️✔️3.9
️✔️redis
️✔️latest
️✔️3.10
️✔️3.9
️✔️relay
️✔️latest
️✔️3.10
️✔️3.9
️✔️resource
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️role
️✔️latest
️✔️3.10
️✔️3.9
️✔️search
️✔️latest
️✔️3.10
️✔️3.9
️✔️security
️✔️latest
️✔️3.10
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.10
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.10
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.10
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.10
️✔️3.9
️✔️sql
️✔️latest
️✔️3.10
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.10
️✔️3.9
️✔️storage
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.10
️✔️3.9
️✔️telemetry
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️util
️✔️latest
️✔️3.10
️✔️3.9
️✔️vm
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9

@azure-client-tools-bot-prd
Copy link

Hi @bebound,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Aug 28, 2023

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Aug 28, 2023

Packaging

Dockerfile Outdated
@@ -61,6 +61,7 @@ RUN ./scripts/install_full.sh && python ./scripts/trim_sdk.py \
| xargs -r apk info --installed \
| sort -u \
)" \
&& echo rundeps $runDeps \
&& apk add --virtual .rundeps $runDeps
Copy link
Contributor Author

@bebound bebound Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runDeps is introduced by #5611

The $runDeps is gdbm libbz2 libcrypto3 libexpat libffi libncursesw libnsl libpanelw libssl3 libtirpc libuuid musl readline sqlite-libs xz-libs zlib, which is installed in python:3.10-alpine. No new package is installed when installs azure-cli.

Virtual is usually used to quickly remove a set of packages, we don't used .rundeps later. It looks like these lines are useless.

/ # apk list -I
.python-rundeps-20230826.011414 noarch {.python-rundeps} () [installed]
alpine-baselayout-3.4.3-r1 x86_64 {alpine-baselayout} (GPL-2.0-only) [installed]
alpine-baselayout-data-3.4.3-r1 x86_64 {alpine-baselayout} (GPL-2.0-only) [installed]
alpine-keys-2.4-r1 x86_64 {alpine-keys} (MIT) [installed]
apk-tools-2.14.0-r2 x86_64 {apk-tools} (GPL-2.0-only) [installed]
busybox-1.36.1-r2 x86_64 {busybox} (GPL-2.0-only) [installed]
busybox-binsh-1.36.1-r2 x86_64 {busybox} (GPL-2.0-only) [installed]
ca-certificates-20230506-r0 x86_64 {ca-certificates} (MPL-2.0 AND MIT) [installed]
ca-certificates-bundle-20230506-r0 x86_64 {ca-certificates} (MPL-2.0 AND MIT) [installed]
gdbm-1.23-r1 x86_64 {gdbm} (GPL-3.0-or-later) [installed]
keyutils-libs-1.6.3-r3 x86_64 {keyutils} (GPL-2.0-or-later AND LGPL-2.0-or-later) [installed]
krb5-conf-1.0-r2 x86_64 {krb5-conf} (MIT) [installed]
krb5-libs-1.20.1-r1 x86_64 {krb5} (MIT) [installed]
libbz2-1.0.8-r5 x86_64 {bzip2} (bzip2-1.0.6) [installed]
libc-utils-0.7.2-r5 x86_64 {libc-dev} (BSD-2-Clause AND BSD-3-Clause) [installed]
libcom_err-1.47.0-r2 x86_64 {e2fsprogs} (GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause AND MIT) [installed]
libcrypto3-3.1.2-r0 x86_64 {openssl} (Apache-2.0) [installed]
libexpat-2.5.0-r1 x86_64 {expat} (MIT) [installed]
libffi-3.4.4-r2 x86_64 {libffi} (MIT) [installed]
libintl-0.21.1-r7 x86_64 {gettext} (LGPL-2.1-or-later) [installed]
libncursesw-6.4_p20230506-r0 x86_64 {ncurses} (X11) [installed]
libnsl-2.0.0-r0 x86_64 {libnsl} (LGPL-2.0-or-later) [installed]
libpanelw-6.4_p20230506-r0 x86_64 {ncurses} (X11) [installed]
libssl3-3.1.2-r0 x86_64 {openssl} (Apache-2.0) [installed]
libtirpc-1.3.3-r2 x86_64 {libtirpc} (BSD-3-Clause) [installed]
libtirpc-conf-1.3.3-r2 x86_64 {libtirpc} (BSD-3-Clause) [installed]
libuuid-2.38.1-r8 x86_64 {util-linux} (BSD-3-Clause) [installed]
libverto-0.3.2-r2 x86_64 {libverto} (MIT) [installed]
musl-1.2.4-r1 x86_64 {musl} (MIT) [installed]
musl-utils-1.2.4-r1 x86_64 {musl} (MIT AND BSD-2-Clause AND GPL-2.0-or-later) [installed]
ncurses-terminfo-base-6.4_p20230506-r0 x86_64 {ncurses} (X11) [installed]
readline-8.2.1-r1 x86_64 {readline} (GPL-2.0-or-later) [installed]
scanelf-1.3.7-r1 x86_64 {pax-utils} (GPL-2.0-only) [installed]
sqlite-libs-3.41.2-r2 x86_64 {sqlite} (blessing) [installed]
ssl_client-1.36.1-r2 x86_64 {busybox} (GPL-2.0-only) [installed]
tzdata-2023c-r1 x86_64 {tzdata} (Public-Domain) [installed]
xz-libs-5.4.3-r0 x86_64 {xz} (GPL-2.0-or-later AND Public-Domain AND LGPL-2.1-or-later) [installed]
zlib-1.2.13-r1 x86_64 {zlib} (Zlib) [installed]

@bebound
Copy link
Contributor Author

bebound commented Sep 11, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@bebound bebound marked this pull request as ready for review September 11, 2023 06:52
@@ -42,9 +42,9 @@ RUN apk add --no-cache bash openssh ca-certificates jq curl openssl perl git zip
&& apk add --no-cache bash-completion \
&& update-ca-certificates

ARG JP_VERSION="0.1.3"
ARG JP_VERSION="0.2.1"
Copy link
Contributor Author

@bebound bebound Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no breaking change from 0.1.3 to 0.2.1
0.2.0 add jp-linux-arm64 release.
Ref: https://github.com/jmespath/jp/releases


RUN curl -L https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-amd64 -o /usr/local/bin/jp \
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && curl -L https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-$arch -o /usr/local/bin/jp \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually bad practice to include additional tools in the docker image. The image should be as small as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea why this image includes so many unrelated packages.
The image for Azure Linux is much smaller: #27204


RUN curl -L https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-amd64 -o /usr/local/bin/jp \
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && curl -L https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-$arch -o /usr/local/bin/jp \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using sed to do the conversion is clever. I also saw this approach in https://stackoverflow.com/a/70369688/2199657.

@bebound bebound merged commit 3eddf8d into Azure:dev Sep 12, 2023
54 checks passed
@bebound bebound deleted the fix-alpine-dockerfile branch September 12, 2023 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants