Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ RUN go mod verify && go mod vendor
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-X github.com/SneaksAndData/nexus-core/pkg/buildmeta.AppVersion=$APPVERSION -X github.com/SneaksAndData/nexus-core/pkg/buildmeta.BuildNumber=$BUILDNUMBER" -o /app -v ./...

FROM --platform=$BUILDPLATFORM public.ecr.aws/amazonlinux/amazonlinux:2 AS aws-cli-stage

ARG TARGETARCH

RUN yum update -y && yum install -y unzip curl \
&& echo "BUILDING AWS CLI FOR: $TARGETARCH" \
&& cli_arch=$(test "$TARGETARCH" = "amd64" && echo "x86_64" || echo "aarch64") \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-$cli_arch.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
Expand All @@ -36,7 +40,7 @@ COPY --from=build-stage /app /app
COPY --from=aws-cli-stage /usr/local/aws-cli/ /usr/local/aws-cli/
COPY --from=aws-cli-stage /aws-cli-bin/ /usr/local/bin/

COPY .container/appconfig.yaml /app/appconfig.yaml
COPY .container/appconfig.yaml /app/appconfig.yaml

USER nonroot:nonroot

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ jobs:
latest=false

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
uses: docker/setup-buildx-action@v3.11.1
with:
use: true
platforms: linux/arm64,linux/amd64

- name: Build and push Docker image
uses: docker/build-push-action@v6.15.0
uses: docker/build-push-action@v6.18.0
with:
context: .
build-args: |
APPVERSION=${{ steps.version.outputs.version }}
BUILDNUMBER=${{ steps.buildnumber.outputs.result }}
context: .
file: .container/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down