File tree Expand file tree Collapse file tree 4 files changed +18
-7
lines changed
Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,17 @@ jobs:
1414 steps :
1515 - name : Checkout
1616 uses : actions/checkout@v4
17- # Docker
18- - name : Docker production
19- run : docker build .
17+ # Set up Docker Buildx for multi-arch support
18+ - name : Set up Docker Buildx
19+ uses : docker/setup-buildx-action@v3
20+ # Build multi-arch image
21+ - name : Build Docker image (multi-arch)
22+ run : |
23+ docker buildx create --use
24+ docker buildx build --platform linux/amd64,linux/arm64 .
2025 # Docker development
2126 - name : Docker development
22- run : docker build -f Dockerfile.brain.dev .
27+ run : docker buildx build -f Dockerfile.brain.dev --platform linux/amd64,linux/arm64 .
2328 build :
2429 runs-on : ubuntu-latest
2530 steps :
Original file line number Diff line number Diff line change @@ -21,11 +21,17 @@ jobs:
2121 username : ${{ github.repository_owner }}
2222 password : ${{ secrets.GITHUB_TOKEN }}
2323
24+ # Set up Docker Buildx for multi-arch support
25+ - name : Set up Docker Buildx
26+ uses : docker/setup-buildx-action@v3
27+
28+ # Build and push multi-arch Docker image
2429 - name : Build and push Staking brain docker monorepo
2530 uses : docker/build-push-action@v3
2631 with :
2732 file : Dockerfile
2833 push : true
34+ platforms : linux/amd64, linux/arm64
2935 tags : ghcr.io/${{ github.repository_owner }}/staking-brain:${{ github.event.inputs.tag }}
3036
3137 gh-release :
Original file line number Diff line number Diff line change 11ARG DOCKER_IMAGE=node:20.17.0-alpine3.20
22
33# Build
4- FROM ${DOCKER_IMAGE} AS build-stage
4+ FROM --platform=$TARGETPLATFORM ${DOCKER_IMAGE} AS build-stage
55
66WORKDIR /app
77COPY package.json yarn.lock tsconfig.json .yarnrc.yml ./
@@ -19,7 +19,7 @@ RUN yarn install --immutable && \
1919 yarn workspaces focus --all --production
2020
2121# Production
22- FROM ${DOCKER_IMAGE}
22+ FROM --platform=$TARGETPLATFORM ${DOCKER_IMAGE}
2323ENV NODE_ENV=production
2424WORKDIR /app
2525COPY ./packages/brain/tls ./tls
Original file line number Diff line number Diff line change 11ARG DOCKER_IMAGE=node:20.17.0-alpine3.20
2- FROM ${DOCKER_IMAGE} as build-stage
2+ FROM --platform=$TARGETPLATFORM ${DOCKER_IMAGE} as build-stage
33
44ENV NODE_ENV=development
55WORKDIR /app
You can’t perform that action at this time.
0 commit comments