Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #################### Atividade 1 #############################
- apt install software-properties-common curl
- apt remove docker.io
- sudo curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose
- chmod a+x /usr/bin/docker-compose
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt update
- sudo apt-get install docker-ce
- sudo docker swarm init
- ##################### Atividade 2 ##############################
- sysctl -w net.ipv6.conf.default.disable_ipv6=1
- docker volume create portainer_data
- docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
- reboot
- ##################### Atividade 3 ##############################
- FROM ubuntu
- LABEL MAINTAINER Guilherme Geronimo
- LABEL MAIL <guilherme.geronimo@gmail.com>
- RUN apt-get update && apt-get install -y nginx && apt-get clean
- EXPOSE 80
- CMD ["nginx", "-g", "daemon off;"]
- ##################### Atividade 4 ##############################
- version: "3.1"
- services:
- s1web:
- image: web
- deploy:
- replicas: 2
- ports:
- - 82:80
- s2web:
- image: web
- ports:
- - 83:80
Advertisement
Add Comment
Please, Sign In to add comment