-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: smaller multiarch docker build
- Loading branch information
Showing
4 changed files
with
86 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
FROM node:20-alpine | ||
FROM mcr.microsoft.com/azure-cli | ||
|
||
# Install python/pip | ||
ENV PYTHONUNBUFFERED=1 | ||
RUN apk add py3-pip | ||
RUN apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo make | ||
RUN pip install --upgrade --break-system-packages pip | ||
RUN pip install --break-system-packages azure-cli | ||
|
||
RUN az --version | ||
ARG TARGETARCH | ||
|
||
WORKDIR /app | ||
|
||
COPY ./dist/scripts/cjs/* /app/ | ||
COPY ./dist/binary/localsandbox-linux-${TARGETARCH} /app/localsandbox | ||
|
||
RUN /app/localsandbox --version | ||
|
||
COPY ./packages/azure-local-cli/azure_local_cli/__main__.py /app/__main__.py | ||
|
||
RUN mkdir -p /app/azl | ||
COPY ./dist/binary/azl-alpine /app/azl/azl | ||
|
||
RUN echo "#!/bin/bash" > /app/azl/azl | ||
RUN echo "PYTHONPATH=/usr/lib64/az/lib/python3.9/site-packages python3 /app/__main__.py \$@" >> /app/azl/azl | ||
RUN chmod +x /app/azl/azl | ||
ENV PATH="/app/azl:${PATH}" | ||
|
||
RUN azl --version | ||
|
||
CMD ["node", "/app/cli.js", "run"] | ||
CMD ["/app/localsandbox", "run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#0 building with "desktop-linux" instance using docker driver | ||
|
||
#1 [internal] load build definition from Dockerfile | ||
#1 transferring dockerfile: 424B done | ||
#1 DONE 0.0s | ||
|
||
#2 [internal] load metadata for mcr.microsoft.com/azure-cli:latest | ||
#2 DONE 0.0s | ||
|
||
#3 [internal] load .dockerignore | ||
#3 transferring context: 2B done | ||
#3 DONE 0.0s | ||
|
||
#4 [1/7] FROM mcr.microsoft.com/azure-cli:latest@sha256:2d18d025d51e28e790855a8666fab5b7672f2aa62210bca3a75c1f3fd9b68e25 | ||
#4 resolve mcr.microsoft.com/azure-cli:latest@sha256:2d18d025d51e28e790855a8666fab5b7672f2aa62210bca3a75c1f3fd9b68e25 done | ||
#4 DONE 0.0s | ||
|
||
#5 [2/7] WORKDIR /app | ||
#5 CACHED | ||
|
||
#6 [internal] load build context | ||
#6 transferring context: 65.37MB 0.3s done | ||
#6 DONE 0.3s | ||
|
||
#7 [3/7] COPY ./dist/binary/localsandbox-linux-amd64 /app/localsandbox | ||
#7 DONE 0.2s | ||
|
||
#8 [4/7] RUN /app/localsandbox --version | ||
#8 1.368 0.1.0 | ||
#8 DONE 1.4s | ||
|
||
#9 [5/7] RUN mkdir -p /app/azl | ||
#9 DONE 0.1s | ||
|
||
#10 [6/7] COPY ./dist/binary/azl-linux-amd64 /app/azl/azl | ||
#10 DONE 0.0s | ||
|
||
#11 [7/7] RUN azl --version | ||
#11 9.302 azure-cli 2.64.0 | ||
#11 9.302 | ||
#11 9.302 core 2.64.0 | ||
#11 9.302 telemetry 1.1.0 | ||
#11 9.302 | ||
#11 9.302 Dependencies: | ||
#11 9.302 msal 1.30.0 | ||
#11 9.302 azure-mgmt-resource 23.1.1 | ||
#11 9.302 | ||
#11 9.302 Python location '/usr/bin/python3.9' | ||
#11 9.302 Extensions directory '/root/.azure/cliextensions' | ||
#11 9.302 | ||
#11 9.302 Python (Linux) 3.9.19 (main, Aug 23 2024, 00:07:48) | ||
#11 9.302 [GCC 11.2.0] | ||
#11 9.302 | ||
#11 9.302 Legal docs and information: aka.ms/AzureCliLegal | ||
#11 9.302 | ||
#11 9.302 | ||
#11 9.302 Your CLI is up-to-date. | ||
#11 DONE 9.5s | ||
|
||
#12 exporting to image | ||
#12 exporting layers | ||
#12 exporting layers 2.1s done | ||
#12 exporting manifest sha256:4637d212deae92cdc0136ec6e2d9d3f84d29c17b98c2a7c395726fb3b64d7591 | ||
#12 exporting manifest sha256:4637d212deae92cdc0136ec6e2d9d3f84d29c17b98c2a7c395726fb3b64d7591 done | ||
#12 exporting config sha256:d136e68e2a004790878f92cb116e5af7c8356df6bbae3caa4d00d2f4a9033837 done | ||
#12 exporting attestation manifest sha256:4eab0131c09b18278cb30dd0ecbb429d50e5e7f49a80e15d4a590153b8102bba done | ||
#12 exporting manifest list sha256:26c5e7a3507e836e5c55aed1be21cde060483a8919976a85c7293aae7eb765e7 done | ||
#12 naming to moby-dangling@sha256:26c5e7a3507e836e5c55aed1be21cde060483a8919976a85c7293aae7eb765e7 done | ||
#12 DONE 2.2s | ||
|
||
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/jorhyc244tif5451v9w492cxa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters