Anuj-Panthri commited on
Commit
99fe37c
·
1 Parent(s): 415ccdb

dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +8 -38
  2. README.md +1 -1
Dockerfile CHANGED
@@ -1,38 +1,8 @@
1
- FROM ubuntu
2
-
3
- WORKDIR /app
4
-
5
-
6
-
7
- COPY . .
8
-
9
- RUN apt-get update && \
10
- apt-get -y upgrade && \
11
- apt-get install -y \
12
- sudo
13
-
14
-
15
-
16
-
17
- RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3 pip vim mc wget curl
18
-
19
-
20
-
21
- RUN pip install -r requirements.txt; \
22
- python3 manage.py makemigrations; \
23
- python3 manage.py migrate;
24
-
25
-
26
-
27
-
28
-
29
-
30
- RUN python3 -c "print('Docker is more simple Deployment Tool')"
31
-
32
- RUN pwd
33
- RUN ls -l
34
-
35
-
36
- EXPOSE 3306
37
-
38
- CMD python3 manage.py runserver
 
1
+ FROM --platform=$BUILDPLATFORM python:3.7-alpine AS builder
2
+ EXPOSE 8000
3
+ WORKDIR /app
4
+ COPY requirements.txt /app
5
+ RUN pip3 install -r requirements.txt --no-cache-dir
6
+ COPY . /app
7
+ ENTRYPOINT ["python3"]
8
+ CMD ["manage.py", "runserver", "0.0.0.0:8000"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -5,7 +5,7 @@ colorFrom: indigo
5
  colorTo: yellow
6
  sdk: docker
7
  pinned: false
8
- app-port: 3306
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
5
  colorTo: yellow
6
  sdk: docker
7
  pinned: false
8
+ app-port: 8000
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference