File tree 5 files changed +48
-2
lines changed
5 files changed +48
-2
lines changed Original file line number Diff line number Diff line change
1
+ FROM debian
2
+
3
+ RUN apt-get update -y && apt-get install -y python3-pip python3-dev
4
+
5
+ COPY ./requirements.txt /app/requirements.txt
6
+
7
+ WORKDIR /app
8
+
9
+ RUN pip3 install -r requirements.txt
10
+
11
+ COPY . /app
12
+
13
+ EXPOSE 3001
14
+
15
+ CMD [ "python3" , "teste.py" ]
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="pt-BR ">
3
+
4
+ < head >
5
+ < meta charset ="UTF-8 ">
6
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
+ < meta http-equiv ="X-UA-Compatible " content ="ie=edge ">
8
+ < title > Hello {{ name }}!</ title >
9
+ </ head >
10
+
11
+ < body >
12
+ < h1 > Hello {{ name }}!</ h1 >
13
+ </ body >
14
+
15
+ </ html >
Original file line number Diff line number Diff line change
1
+ Flask == 1.0.2
Original file line number Diff line number Diff line change
1
+ import flask
2
+ from flask import Flask , render_template
3
+
4
+ app = Flask (__name__ , template_folder = '' )
5
+
6
+ @app .route ("/" )
7
+ def index ():
8
+ return "Flask App!"
9
+
10
+ @app .route ("/hello/<string:name>/" )
11
+ def hello (name ):
12
+ return render_template ('hello.html' ,name = name )
13
+
14
+ if __name__ == "__main__" :
15
+ app .run (host = '0.0.0.0' , port = 3000 )
Original file line number Diff line number Diff line change 3
3
</p >
4
4
5
5
# Criação e Execução da imagem
6
- #### GoLang
7
- > Para executar o teste execute os comandos abaixo
6
+ #### GoLang, Python3
7
+ > Para executar o teste execute os comandos abaixo dentro da pasta de determinada linguagem
8
8
9
9
1 . Criar a imagem ``` docker build -t luizfilipy/app . ```
10
10
2 . Executar imagem ``` docker run -p 3001:3000 -d luizfilipy/app ```
You can’t perform that action at this time.
0 commit comments