-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use python3 venv which is recommended for adhering with PEP 668.
Starting alpine:3.19 with py3-pip v23.3.1-r0, py3-pip installations using apk will cause the error `error: externally-managed-environment` when pip attempts to upgrade the pip installation. We now use a virtual env for the test app to avoid this issue. Change-type: patch Signed-off-by: Carlo Miguel F. Cruz <[email protected]>
- Loading branch information
Showing
3 changed files
with
8 additions
and
4 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
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
FROM balenalib/%%RESIN_MACHINE_NAME%%-alpine:latest | ||
|
||
RUN apk update && apk add bash py-pip lockfile-progs --no-cache && \ | ||
WORKDIR /usr/src/app | ||
|
||
RUN apk update && apk add bash python3 lockfile-progs --no-cache && \ | ||
python3 -m venv venv && \ | ||
source venv/bin/activate && \ | ||
pip install --upgrade pip && \ | ||
pip install flask | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . ./ | ||
|
||
CMD ["bash", "start.sh"] |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#!/bin/bash | ||
|
||
source venv/bin/activate | ||
|
||
python server.py & | ||
for ((i=1;i<=5;i++)); | ||
do | ||
|