Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARM support #1241

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
10 changes: 7 additions & 3 deletions .github/workflows/build-images.reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Node.js
uses: actions/setup-node@v3
Expand All @@ -27,16 +30,17 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.IOTALEDGER_DOCKER_USERNAME }}
password: ${{ secrets.IOTALEDGER_DOCKER_PASSWORD }}

- name: Build and push Docker image for ${{ inputs.directory }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: ./${{ inputs.directory }}
file: ./${{ inputs.directory }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ inputs.image_tags }}
no-cache: true
3 changes: 2 additions & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ COPY . ./
ARG CONFIG_ID

# Install all packages necessary for compilation, build, then remove the devDependencies
RUN npm install
# Seems to fail for arm64 images if maxsockets is not set to 1. https://github.com/npm/cli/issues/4652#issuecomment-1157594100
RUN npm install --maxsockets 1
RUN npm run build-compile
RUN npm run build-config
RUN npm prune --production
Expand Down
3 changes: 2 additions & 1 deletion client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ RUN echo 'server {\
}' > /etc/nginx/sites-available/default

# Running required steps to prepare the web app prod build
RUN npm install
# Seems to fail for arm64 images if maxsockets is not set to 1. https://github.com/npm/cli/issues/4652#issuecomment-1157594100
RUN npm install --maxsockets 1
RUN npm run build

# Expose port 80
Expand Down
Loading