pluviouse commited on
Commit
42e2159
·
verified ·
1 Parent(s): 7b7f715

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+ RUN apt-get update
3
+ RUN apt-get install -y fakeroot
4
+ RUN mv /usr/bin/apt-get /usr/bin/.apt-get
5
+ RUN echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get
6
+ RUN chmod +x /usr/bin/apt-get
7
+ RUN rm -rf /var/lib/apt/lists/*
8
+ RUN useradd -m -u 1000 user
9
+
10
+ WORKDIR /home/user/app
11
+
12
+ RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
13
+
14
+ RUN pip freeze > /tmp/freeze.txt
15
+
16
+ COPY --link --chown=1000 ./ /home/user/app
17
+
18
+ COPY --from=pipfreeze --link --chown=1000 /tmp/freeze.txt /tmp/freeze.txt
19
+
20
+ CMD ["python3", "app.py"]