Skip to content

Commit 1e50135

Browse files
committed
First version
1 parent 53a302e commit 1e50135

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)