We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53a302e commit 1e50135Copy full SHA for 1e50135
Dockerfile
@@ -0,0 +1,22 @@
1
+FROM python:3.7-alpine
2
+
3
+# Install bash
4
+# Create user and home directory
5
+# Create base directory
6
+RUN apk add --no-cache bash build-base libstdc++ &&\
7
+ adduser -u 1000 -S -h /home/python python &&\
8
+ mkdir -p /python && chown python:nogroup /python
9
10
+# Change users
11
+USER python
12
13
+# Create base app directory
14
+RUN mkdir /python/app
15
16
+# Change directory
17
+WORKDIR /python/app
18
19
+# Install packages in python home directory
20
+ENV PYTHONUSERBASE /home/python
21
+ENV PATH $PATH:/home/python/bin
22
+ENV PYTHONPATH /python/app
0 commit comments