-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (16 loc) · 879 Bytes
/
Dockerfile
File metadata and controls
26 lines (16 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#Para rodar a versão do Ubuntu no container
FROM ubuntu:22.04
#Atualização do sistema
RUN apt-get update
#Instalação do NGINX, ZIP, CURL
RUN apt-get install -y nginx zip curl
#Daemon off quer dizer que o NGINX não irá rodar no background, ou seja rodará no foreground.
RUN echo "daemon off;" >>/etc/nginx/nginx.conf
#Curl para fazer o download do arquivo zip e o path onde ele será salvo, -L para ... , link do arquivo quer será feito o download
RUN curl -o /var/www/html/master.zip -L https://github.com/gabrielecirulli/2048/archive/refs/heads/master.zip
#CD para ir até a pasta, fazer o unzip, mover para a pasta e limpar a pasta do arquivo zip
RUN cd /var/www/html/ && unzip master.zip && mv 2048-master/* . && rm -rf 2048-master master.zip
#export na porta 80
EXPOSE 80
#manter o sistema rodando.
CMD ["/usr/sbin/nginx", "-c", "/etc/nginx/nginx.conf"]