Anuj-Panthri commited on
Commit
bb6dd2f
·
1 Parent(s): 5596dd0

dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -15
Dockerfile CHANGED
@@ -1,23 +1,19 @@
1
- FROM ubuntu
2
- # FROM alpine:3.16.0
3
-
4
- RUN apt-get update && \
5
- apt-get -y upgrade && \
6
- apt-get install -y \
7
- sudo
8
-
9
 
 
10
 
11
 
12
- RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3 pip vim mc wget curl
13
 
14
- # to make open-cv work
15
- RUN apt-get install ffmpeg libsm6 libxext6 -y
 
 
 
16
 
17
 
18
 
19
- COPY . /app
20
- WORKDIR /app
21
  RUN pip install -r requirements.txt
22
 
23
 
@@ -30,5 +26,5 @@ RUN ls -l
30
 
31
  EXPOSE 3212
32
 
33
-
34
- RUN python3 manage.py runserver 0.0.0.0:3212
 
1
+ FROM alpine:3.16.0
2
+ WORKDIR /app
 
 
 
 
 
 
3
 
4
+ RUN set -xe;
5
 
6
 
7
+ COPY . .
8
 
9
+ RUN apk add --no-cache python3 py3-pip tini; \
10
+ pip install --upgrade pip setuptools-scm; \
11
+ python3 setup.py install; \
12
+ python3 manage.py makemigrations; \
13
+ python3 manage.py migrate;
14
 
15
 
16
 
 
 
17
  RUN pip install -r requirements.txt
18
 
19
 
 
26
 
27
  EXPOSE 3212
28
 
29
+ ENTRYPOINT [ "tini", "--" ]
30
+ CMD [ "python3", "/app/manage.py", "runserver", "0.0.0.0:3212" ]