Skip to content

Commit

Permalink
Build Theia IDE Docker Image for ARM as well #338
Browse files Browse the repository at this point in the history
* also update used action versions to SHA instead of tags

Contributed on behalf of STMicroelectronics
  • Loading branch information
jfaltermeier committed Dec 12, 2024
1 parent 9a73b12 commit 0b2c377
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Test (Linux)
if: matrix.tests != 'skip' && runner.os == 'Linux'
uses: GabrielBB/xvfb-action@v1
uses: GabrielBB/xvfb-action@86d97bde4a65fe9b290c0b3fb92c2c4ed0e5302d #1.6
with:
run: yarn electron test

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-builder-img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
uses: actions/checkout@v2

- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: .
push: true
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/publish-theia-ide-img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,43 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
install: true
driver: docker-container
driver-opts: |
image=moby/buildkit:latest
network=host
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to the Github Container registry
uses: docker/login-action@v1
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: List docker buildx available platforms
shell: bash
run: |
docker buildx inspect --bootstrap
- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: .
file: browser.Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}/theia-ide:${{ github.event.inputs.tag }}
ghcr.io/${{ github.repository }}/theia-ide:latest
ghcr.io/${{ github.repository }}/theia-ide:latest
platforms: linux/amd64,linux/arm64
3 changes: 2 additions & 1 deletion browser.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ COPY . .
# Remove unnecesarry files for the browser application
# Download plugins and build application production mode
# Use yarn autoclean to remove unnecessary files from package dependencies
RUN yarn --pure-lockfile && \
RUN yarn config set network-timeout 600000 -g && \
yarn --pure-lockfile && \
yarn build:extensions && \
yarn download:plugins && \
yarn browser build && \
Expand Down

0 comments on commit 0b2c377

Please sign in to comment.