Skip to content

Commit

Permalink
Fixed install for apt-based images
Browse files Browse the repository at this point in the history
shell-based if statements do not seem to work within RUN, this
refactoring works without them
  • Loading branch information
glpatcern committed Feb 24, 2023
1 parent b866c68 commit 76d7ac3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions wopiserver.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ LABEL maintainer="cernbox-admins@cern.ch" \
# prerequisites: we explicitly install g++ as it is required by grpcio but missing from its dependencies
WORKDIR /app
COPY requirements.txt .
RUN if command -v apk &> /dev/null; then \
echo "Using apk"; apk add curl g++; \
elif command -v apt &> /dev/null; then \
echo "Using apt"; apt -y install g++; \
else \
echo "This distribution does not provide a supported package manager"; false; \
fi
RUN command -v apk && apk add curl g++
RUN command -v apt && apt update && apt -y install curl g++
RUN pip3 install --upgrade pip setuptools && \
pip3 install --no-cache-dir --upgrade -r requirements.txt

Expand Down

0 comments on commit 76d7ac3

Please sign in to comment.