shikibu9419 commited on
Commit
fe2a1de
·
1 Parent(s): 54683c5

Fix user permission

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+ USER root
3
+
4
+ RUN apt-get update
5
+ RUN apt-get upgrade -y
6
+ RUN apt-get -y install locales vim less libgl1-mesa-dev && \
7
+ localedef -f UTF-8 -i ja_JP ja_JP.UTF-8
8
+ ENV LANG ja_JP.UTF-8
9
+ ENV LANGUAGE ja_JP:ja
10
+ ENV LC_ALL ja_JP.UTF-8
11
+ ENV TZ JST-9
12
+ ENV TERM xterm
13
+
14
+ RUN useradd -m -u 1000 prod
15
+ USER prod
16
+ ENV HOME=/home/prod \
17
+ PATH=/home/prod/.local/bin:$PATH
18
+
19
+ WORKDIR $HOME/app
20
+
21
+ COPY ./requirements.txt $HOME/app/requirements.txt
22
+
23
+ RUN pip install --upgrade pip
24
+ RUN pip install --upgrade setuptools
25
+ RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt
26
+
27
+ COPY . $HOME/app
28
+
29
+ CMD ["flask", "run", "--host", "0.0.0.0"]