Skip to content

Commit 4f99815

Browse files
authored
fix: use curl image for netcore for faster build (#99)
1 parent 0fc3d6d commit 4f99815

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

netcore/helper-image/Dockerfile

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
FROM mcr.microsoft.com/dotnet/runtime:6.0 as netcore
2-
RUN apt-get update \
3-
&& apt-get install -y --no-install-recommends unzip curl \
4-
&& curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l /vsdbg
1+
FROM --platform=$BUILDPLATFORM curlimages/curl as netcore
2+
ARG BUILDPLATFORM
3+
ARG TARGETPLATFORM
4+
# assume glibc; RuntimeIDs gleaned from the getvsdbgsh script
5+
RUN RuntimeID=$(case "$TARGETPLATFORM" in linux/amd64) echo linux-x64;; linux/arm64) echo linux-arm64;; *) exit 1;; esac); \
6+
mkdir $HOME/vsdbg && curl -sSL https://aka.ms/getvsdbgsh | sh /dev/stdin -v latest -l $HOME/vsdbg -r $RuntimeID
57

68
# Now populate the duct-tape image with the language runtime debugging support files
79
# The debian image is about 95MB bigger
8-
FROM busybox
9-
ARG BUILDPLATFORM
10+
FROM --platform=$TARGETPLATFORM busybox
11+
ARG TARGETPLATFORM
1012

1113
# The install script copies all files in /duct-tape to /dbg
1214
COPY install.sh /
1315
CMD ["/bin/sh", "/install.sh"]
1416
WORKDIR /duct-tape
15-
COPY --from=netcore /vsdbg/ netcore/
17+
COPY --from=netcore /home/curl_user/vsdbg/ netcore/

0 commit comments

Comments
 (0)