From 0c6242bfffb5998ffa5772b30d73f79bfa64e542 Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Mon, 17 Jul 2023 10:42:38 -0400 Subject: [PATCH 1/8] update dotnet builder version --- src/cartservice/src/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cartservice/src/Dockerfile b/src/cartservice/src/Dockerfile index a711986268..42c3af5587 100644 --- a/src/cartservice/src/Dockerfile +++ b/src/cartservice/src/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # https://mcr.microsoft.com/v2/dotnet/sdk/tags/list -FROM mcr.microsoft.com/dotnet/sdk:7.0.304 AS builder +FROM mcr.microsoft.com/dotnet/sdk:7.0.306 AS builder WORKDIR /usr/src/app/ From aa40adfb456436f2bf0ceddfcf9187fa3e42ea30 Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Mon, 17 Jul 2023 12:12:29 -0400 Subject: [PATCH 2/8] update docker version --- .github/workflows/build-images.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 594f68e89f..9bbbb63768 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -90,6 +90,18 @@ jobs: context: ./ steps: + - name: Check Docker Version + run: docker --version + + - name: Install Latest Docker + run: | + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + sudo apt-get update + sudo apt-get install docker-ce + - name: Check Docker Version + run: docker --version + - uses: actions/checkout@v3 with: fetch-depth: 0 From 3cae1720d9903639acdea6023f6a8d13c45f4115 Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Mon, 17 Jul 2023 14:08:00 -0400 Subject: [PATCH 3/8] fix yaml lint --- .github/workflows/build-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 9bbbb63768..bdb57ad639 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -92,7 +92,7 @@ jobs: steps: - name: Check Docker Version run: docker --version - + - name: Install Latest Docker run: | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - @@ -101,7 +101,7 @@ jobs: sudo apt-get install docker-ce - name: Check Docker Version run: docker --version - + - uses: actions/checkout@v3 with: fetch-depth: 0 From 2d83450ca2dd2fd6cb1c1b46586cd8ceefa05350 Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Mon, 17 Jul 2023 14:44:33 -0400 Subject: [PATCH 4/8] change builder image --- .github/workflows/build-images.yml | 12 ------------ src/cartservice/src/Dockerfile | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index bdb57ad639..594f68e89f 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -90,18 +90,6 @@ jobs: context: ./ steps: - - name: Check Docker Version - run: docker --version - - - name: Install Latest Docker - run: | - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get install docker-ce - - name: Check Docker Version - run: docker --version - - uses: actions/checkout@v3 with: fetch-depth: 0 diff --git a/src/cartservice/src/Dockerfile b/src/cartservice/src/Dockerfile index 42c3af5587..f1b5f130a0 100644 --- a/src/cartservice/src/Dockerfile +++ b/src/cartservice/src/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # https://mcr.microsoft.com/v2/dotnet/sdk/tags/list -FROM mcr.microsoft.com/dotnet/sdk:7.0.306 AS builder +FROM mcr.microsoft.com/dotnet/sdk:7.0.306-bookworm-slim AS builder WORKDIR /usr/src/app/ From 013e9e8ad515d0be53e487b093cbdb8622793cd9 Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Mon, 17 Jul 2023 14:54:39 -0400 Subject: [PATCH 5/8] try different qemu container --- .github/workflows/build-images.yml | 2 ++ src/cartservice/src/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 594f68e89f..90218f3345 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -111,6 +111,8 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v2 + with: + image: tonistiigi/binfmt:master - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/src/cartservice/src/Dockerfile b/src/cartservice/src/Dockerfile index f1b5f130a0..42c3af5587 100644 --- a/src/cartservice/src/Dockerfile +++ b/src/cartservice/src/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # https://mcr.microsoft.com/v2/dotnet/sdk/tags/list -FROM mcr.microsoft.com/dotnet/sdk:7.0.306-bookworm-slim AS builder +FROM mcr.microsoft.com/dotnet/sdk:7.0.306 AS builder WORKDIR /usr/src/app/ From 674c02755e19e4f36cf2a30d03e801912accb664 Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Tue, 18 Jul 2023 09:41:54 -0400 Subject: [PATCH 6/8] disable static web assets entirely --- src/cartservice/src/cartservice.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cartservice/src/cartservice.csproj b/src/cartservice/src/cartservice.csproj index 2f6c8c7f5e..9a55a1e6f1 100644 --- a/src/cartservice/src/cartservice.csproj +++ b/src/cartservice/src/cartservice.csproj @@ -21,4 +21,8 @@ + + + false + From 1b1a2a140b8b91ab6e1c0ffa0568b07aa2052a89 Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Tue, 18 Jul 2023 09:53:01 -0400 Subject: [PATCH 7/8] fix build issue --- src/cartservice/src/cartservice.csproj | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cartservice/src/cartservice.csproj b/src/cartservice/src/cartservice.csproj index 9a55a1e6f1..df873499dd 100644 --- a/src/cartservice/src/cartservice.csproj +++ b/src/cartservice/src/cartservice.csproj @@ -2,6 +2,8 @@ net7.0 + false + false @@ -21,8 +23,4 @@ - - - false - From 551067480d47b6ac6e12f03e503e7caa576db7d0 Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Tue, 18 Jul 2023 14:30:40 -0400 Subject: [PATCH 8/8] split stages and increase loglevel --- src/cartservice/src/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cartservice/src/Dockerfile b/src/cartservice/src/Dockerfile index 42c3af5587..ef6343095d 100644 --- a/src/cartservice/src/Dockerfile +++ b/src/cartservice/src/Dockerfile @@ -25,8 +25,12 @@ COPY ./pb/ ./src/protos/ RUN \ RUNTIME_IDENTIIFER=linux-musl-x64; \ if [ "$(uname -m)" = "aarch64" ]; then RUNTIME_IDENTIIFER=linux-musl-arm64; fi; \ - dotnet restore ./src/cartservice.csproj -r $RUNTIME_IDENTIIFER && \ - dotnet publish ./src/cartservice.csproj -p:PublishSingleFile=true -r $RUNTIME_IDENTIIFER --self-contained true -p:PublishTrimmed=False -p:TrimMode=Link -c Release -o /cartservice --no-restore + dotnet restore ./src/cartservice.csproj -v d -r $RUNTIME_IDENTIIFER + +RUN \ + RUNTIME_IDENTIIFER=linux-musl-x64; \ + if [ "$(uname -m)" = "aarch64" ]; then RUNTIME_IDENTIIFER=linux-musl-arm64; fi; \ + dotnet publish ./src/cartservice.csproj -v d -p:PublishSingleFile=true -r $RUNTIME_IDENTIIFER --self-contained true -p:PublishTrimmed=False -p:TrimMode=Link -c Release -o /cartservice --no-restore # -----------------------------------------------------------------------------