Skip to content

Commit

Permalink
docker: fix build on arm64 architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
tiborsimko committed Nov 1, 2023
1 parent 80d01b7 commit 9da1288
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Version 0.9.2 (UNRELEASED)

- Adds option to delete all the runs of a workflow.
- Changes Docker image Node version from 16 to 18.
- Fixes container image building on the arm64 architecture.

Version 0.9.1 (2023-09-27)
--------------------------
Expand Down
31 changes: 26 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
FROM docker.io/library/node:18 as react-build
# Use Node 18
# hadolint ignore=DL3029
FROM --platform=$BUILDPLATFORM docker.io/library/node:18 as react-build

# Use default answers in installation commands
ENV DEBIAN_FRONTEND=noninteractive

# Copy cluster component source code
WORKDIR /code
COPY . /code
# hadolint ignore=DL3003
RUN cd reana-ui && \
yarn && \
yarn build

# Build frontend application
# hadolint ignore=DL3003,DL3008
RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
build-essential \
libcairo2-dev \
libgif-dev \
libjpeg-dev \
libpango1.0-dev \
librsvg2-dev && \
cd reana-ui && \
yarn --network-timeout 600000 && \
yarn build && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Serve frontend application
FROM docker.io/library/nginx:1.19
COPY --from=react-build /code/reana-ui/build /usr/share/nginx/html
COPY nginx/reana-ui.conf /etc/nginx/conf.d/default.conf
Expand Down
2 changes: 1 addition & 1 deletion run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ check_js_tests () {
}

check_dockerfile () {
docker run -i --rm docker.io/hadolint/hadolint:v1.18.2 < Dockerfile
docker run -i --rm docker.io/hadolint/hadolint:v2.12.0 < Dockerfile
}

check_docker_build () {
Expand Down

0 comments on commit 9da1288

Please sign in to comment.