From 18bf8b434852eb391acd51f592364cfa52a1b9b5 Mon Sep 17 00:00:00 2001 From: Mayank Pande Date: Tue, 20 Aug 2024 09:36:18 +0530 Subject: [PATCH] fix: fix for alpine image start --- .github/workflows/dev-ci.yaml | 2 +- .github/workflows/prod-ci.yaml | 2 +- Dockerfile.alpine | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dev-ci.yaml b/.github/workflows/dev-ci.yaml index 3b2ffb10..f96ec765 100644 --- a/.github/workflows/dev-ci.yaml +++ b/.github/workflows/dev-ci.yaml @@ -32,7 +32,7 @@ jobs: uses: docker/build-push-action@v3 with: context: . - file: 'Dockerfile' + file: 'Dockerfile.alpine' push: true tags: | 280501305789.dkr.ecr.us-east-1.amazonaws.com/nudgebee-node-agent:${{ env.tag }} diff --git a/.github/workflows/prod-ci.yaml b/.github/workflows/prod-ci.yaml index b83f59bc..61aa7c7d 100644 --- a/.github/workflows/prod-ci.yaml +++ b/.github/workflows/prod-ci.yaml @@ -32,7 +32,7 @@ jobs: uses: docker/build-push-action@v3 with: context: . - file: 'Dockerfile' + file: 'Dockerfile.alpine' push: true tags: | 740395098545.dkr.ecr.us-east-1.amazonaws.com/nudgebee-node-agent:${{ env.tag }} diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 11bd4e17..e2045fa4 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -27,6 +27,6 @@ RUN CGO_ENABLED=1 go build -mod=readonly -ldflags "-X main.version=$VERSION" -o FROM --platform=linux/amd64 alpine:3.19 AS release-stage WORKDIR /app -COPY --from=build-stage /app/coroot-node-agent /app/coroot-node-agent -RUN chmod +x /app/coroot-node-agent -CMD ["/app/coroot-node-agent"] \ No newline at end of file +COPY --from=build-stage /app/coroot-node-agent /usr/bin/coroot-node-agent +RUN chmod +x /usr/bin/coroot-node-agent +CMD ["coroot-node-agent"] \ No newline at end of file