Skip to content

Commit 38f8542

Browse files
Merge pull request #10 from balena-io/cmfcruz/use-python-venv
Use python3 venv which is recommended for adhering with PEP 668.
2 parents b70d736 + 045c611 commit 38f8542

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/flowzone.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ jobs:
1414
(github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target')
1515
uses: product-os/flowzone/.github/workflows/flowzone.yml@master
1616
secrets: inherit
17-
with: {}

Dockerfile.template

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
FROM balenalib/%%RESIN_MACHINE_NAME%%-alpine:latest
22

3-
RUN apk update && apk add bash py-pip lockfile-progs --no-cache && \
3+
WORKDIR /usr/src/app
4+
5+
RUN apk update && apk add bash python3 lockfile-progs --no-cache && \
6+
python3 -m venv venv && \
7+
source venv/bin/activate && \
48
pip install --upgrade pip && \
59
pip install flask
610

7-
WORKDIR /usr/src/app
8-
911
COPY . ./
1012

1113
CMD ["bash", "start.sh"]

start.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/bin/bash
2+
3+
source venv/bin/activate
4+
25
python server.py &
36
for ((i=1;i<=5;i++));
47
do

0 commit comments

Comments
 (0)