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 Oct 31, 2023
1 parent 2f61e13 commit c4658c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changes
=======

Version 0.9.2 (UNRELEASED)
--------------------------

- Fixes container image building on the arm64 architecture.

Version 0.9.1 (2023-09-27)
--------------------------

Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@ ENV DEBIAN_FRONTEND=noninteractive
COPY requirements.txt /code/

# Install all system and Python dependencies in one go
# hadolint ignore=DL3008, DL3013
# hadolint ignore=DL3008,DL3013
RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
gcc \
nodejs \
python3.8 \
python3-dev \
python3-pip \
vim-tiny && \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r /code/requirements.txt && \
apt-get remove -y \
gcc && \
gcc \
python3-dev && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Expand All @@ -36,11 +38,11 @@ COPY . /code

# Are we debugging?
ARG DEBUG=0
RUN if [ "${DEBUG}" -gt 0 ]; then pip install -e ".[debug]"; else pip install .; fi;
RUN if [ "${DEBUG}" -gt 0 ]; then pip install --no-cache-dir -e ".[debug]"; else pip install --no-cache-dir .; fi;

# Are we building with locally-checked-out shared modules?
# hadolint ignore=SC2102
RUN if test -e modules/reana-commons; then pip install -e modules/reana-commons[kubernetes] --upgrade; fi
RUN if test -e modules/reana-commons; then pip install --no-cache-dir -e modules/reana-commons[kubernetes] --upgrade; fi

# Check for any broken Python dependencies
RUN pip check
Expand Down
2 changes: 1 addition & 1 deletion run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ check_pytest () {
}

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 c4658c7

Please sign in to comment.