Skip to content

Instantly share code, notes, and snippets.

@RufusJWB
Last active January 10, 2024 16:40
Show Gist options
  • Save RufusJWB/ebf95c6ff7aa85e487a55167fa3048df to your computer and use it in GitHub Desktop.
Save RufusJWB/ebf95c6ff7aa85e487a55167fa3048df to your computer and use it in GitHub Desktop.
Build multistage build with Docker
[internal] load build definition from Dockerfile
transferring 1.1 kB 0.0s
[internal] load metadata for mcr.microsoft.com/dotnet/sdk:8.0
[internal] load metadata for mcr.microsoft.com/dotnet/aspnet:8.0
[internal] load .dockerignore
[internal] load build context
transferring 334 Bytes 0.0s
[build 1/8] FROM mcr.microsoft.com/dotnet/sdk:8.0@sha256:466256c75729ba0d7a08bb95c307f1e978b25716ab5fa5913b2c2c256e2a5dc2
resolve mcr.microsoft.com/dotnet/sdk:8.0@sha256:466256c75729ba0d7a08bb95c307f1e978b25716ab5fa5913b2c2c256e2a5dc2 0.0s
[base 1/3] FROM mcr.microsoft.com/dotnet/aspnet:8.0@sha256:98b1a1c082b85fef817e8bc6ec633dcbf899dc81aa8bcc575bde70d1f2fccfc5
resolve mcr.microsoft.com/dotnet/aspnet:8.0@sha256:98b1a1c082b85fef817e8bc6ec633dcbf899dc81aa8bcc575bde70d1f2fccfc5 0.1s
[final 1/2] WORKDIR /app
[base 3/3] WORKDIR /app
[base 2/3] RUN apt-get update && apt-get upgrade -y
[build 4/8] COPY [PROXY Protocol Tester.csproj, .]
[build 2/8] RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends clang zlib1g-dev
[build 7/8] WORKDIR /src/.
[build 5/8] RUN dotnet restore "./PROXY Protocol Tester.csproj"
[publish 1/1] RUN dotnet publish "./PROXY Protocol Tester.csproj" -c Release -o /app/publish /p:UseAppHost=true
[final 2/2] COPY --from=publish /app/publish .
[build 3/8] WORKDIR /src
[build 6/8] COPY . .
[build 8/8] RUN dotnet build "./PROXY Protocol Tester.csproj" -c Release -o /app/build
exporting to image
exporting layers 0.0s
exporting manifest sha256:3e9ef4b2d6cef0a138f2a9afb4f18bba64f4624946c9f2e5068a098ce9774ad5 0.0s
exporting config sha256:9c23b3f143b71fbc81620b53f315276613a48c752a82af6d2ad67366c65dc998 0.0s
exporting attestation manifest sha256:de01bb37148dc72e40d7bbc85d927d84e78f43552589b6d09d2e21120ccfbe44 0.0s
exporting manifest list sha256:3af25f157569351de4ebe7b9558e4a6a033e006ec18c6e72c0b6e45c609fbed8 0.0s
naming to docker.io/library/dockerbuild:working 0.0s
unpacking to docker.io/library/dockerbuild:working 0.0s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment