-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shell-based if statements do not seem to work within RUN, this refactoring works without them
- Loading branch information
Showing
1 changed file
with
2 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,8 @@ LABEL maintainer="[email protected]" \ | |
# 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++ || true | ||
RUN command -v apt && apt update && apt -y install curl g++ || true | ||
RUN pip3 install --upgrade pip setuptools && \ | ||
pip3 install --no-cache-dir --upgrade -r requirements.txt | ||
|
||
|