example-voting-app
example-voting-app copied to clipboard
Worker App build error
Description
docker compose up
renders the following error while building an image for the worker app.
Same issue encountered here, wondering if there is any help??
Description 描述
docker compose up
renders the following error while building an image for the worker app.docker compose up
在为工作应用程序构建图像时呈现以下错误。
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
Same error for me as well, is it officially fixed now?
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
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: @.***>
can you share the repo with me please. thanks man
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: @.***>
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"] `
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。