-
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.
Merge pull request #10 from balena-io/cmfcruz/use-python-venv
Use python3 venv which is recommended for adhering with PEP 668.
- 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 | ||
|