example-voting-app icon indicating copy to clipboard operation
example-voting-app copied to clipboard

Worker App build error

Open vamagithub opened this issue 1 year ago • 9 comments

Description docker compose up renders the following error while building an image for the worker app.

image

vamagithub avatar Dec 08 '23 10:12 vamagithub

Same issue encountered here, wondering if there is any help??

Vincent990413 avatar Dec 26 '23 02:12 Vincent990413

Description 描述 docker compose up renders the following error while building an image for the worker app. docker compose up 在为工作应用程序构建图像时呈现以下错误。

image

Hi! Actually I just found some solutions, here is a new Yaml file which works. You might want to replace it into the older one.

apiVersion: apps/v1 kind: Deployment metadata: name: postgres-deployment labels: app: demo-voting-app spec: replicas: 1 selector: matchLabels: name: postgres-pod app: demo-voting-app template: metadata: name: postgres-pod labels: name: postgres-pod app: demo-voting-app spec: containers: - name: postgres image: postgres:9.4 env: - name: POSTGRES_USER value: postgres - name: POSTGRES_PASSWORD value: postgres - name: POSTGRES_HOST_AUTH_METHOD value: trust ports: - containerPort: 5432

Vincent990413 avatar Dec 26 '23 02:12 Vincent990413

Same error for me as well, is it officially fixed now?

imluth avatar Jan 16 '24 02:01 imluth

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

Vincent990413 avatar Jan 16 '24 02:01 Vincent990413

Actually I’ve already given up this project. There is another accessible one on GitHub. 

------------------ Original ------------------ From: Looth Ibrahim @.> Date: Tue,Jan 16,2024 10:10 AM To: dockersamples/example-voting-app @.> Cc: 桑榆非晚 @.>, Comment @.> Subject: Re: [dockersamples/example-voting-app] Worker App build error (Issue#324)

Same error for me as well, is it officially fixed now?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Vincent990413 avatar Jan 16 '24 02:01 Vincent990413

can you share the repo with me please. thanks man

imluth avatar Jan 16 '24 02:01 imluth

Sure. I’m gonna look for it. 

------------------ Original ------------------ From: Looth Ibrahim @.> Date: Tue,Jan 16,2024 10:16 AM To: dockersamples/example-voting-app @.> Cc: 桑榆非晚 @.>, Comment @.> Subject: Re: [dockersamples/example-voting-app] Worker App build error (Issue#324)

can you share the repo with me please. thanks man

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Vincent990413 avatar Jan 16 '24 02:01 Vincent990413

We manage to work:

docker-compose.yml

`

worker: platform: linux/amd64 environment: - DOCKER_DEFAULT_PLATFORM=linux/amd64 build: args: TARGETPLATFORM: linux/amd64 TARGETARCH: amd64 context: ./worker depends_on: redis: condition: service_healthy db: condition: service_healthy networks: - back-tier `

worker/Dockerfile:

`

FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:7.0 as build ARG TARGETPLATFORM ARG TARGETARCH #ARG BUILDPLATFORM RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

WORKDIR /source COPY *.csproj . RUN dotnet restore -a $TARGETARCH

COPY . . RUN dotnet publish -c release -o /app -a $TARGETARCH --self-contained false --no-restore

# app image FROM mcr.microsoft.com/dotnet/runtime:7.0 WORKDIR /app COPY --from=build /app . ENTRYPOINT ["dotnet", "Worker.dll"] `

dcc6fvo avatar Mar 22 '24 19:03 dcc6fvo

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

Vincent990413 avatar Mar 22 '24 19:03 Vincent990413