Skip to content

Commit

Permalink
docker: hadolint upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
tiborsimko committed Oct 31, 2023
1 parent 2890a68 commit 58f0261
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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 \
Expand Down Expand Up @@ -45,17 +45,18 @@ 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,yadage,snakemake,cwl] --upgrade; fi
RUN if test -e modules/reana-db; then pip install -e modules/reana-db --upgrade; fi
RUN if test -e modules/reana-commons; then pip install --no-cache-dir -e modules/reana-commons[kubernetes,yadage,snakemake,cwl] --upgrade; fi
RUN if test -e modules/reana-db; then pip install --no-cache-dir -e modules/reana-db --upgrade; fi

# A quick fix to allow eduGAIN and social login users that wouldn't otherwise match Invenio username rules
RUN sed -i 's|^username_regex = re.compile\(.*\)$|username_regex = re.compile("^\\S+$")|g' /usr/local/lib/python3.8/dist-packages/invenio_userprofiles/validators.py

# Check for any broken Python dependencies
# hadolint ignore=DL3059
RUN pip check

# Set useful environment variables
Expand Down
2 changes: 1 addition & 1 deletion run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,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 58f0261

Please sign in to comment.