-
Notifications
You must be signed in to change notification settings - Fork 0
/
ms-desenv.ps1
67 lines (54 loc) · 2.08 KB
/
ms-desenv.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# --------------------------------------------------------------------
# Checking Execution Policy
# --------------------------------------------------------------------
#$Policy = "Unrestricted"
$Policy = "RemoteSigned"
If ((get-ExecutionPolicy) -ne $Policy) {
Write-Host "Script Execution is disabled. Enabling it now"
Set-ExecutionPolicy $Policy -Force
Write-Host "Please Re-Run this script in a new powershell enviroment"
Exit
}
# --------------------------------------------------------------------
# Instalar chocolatey
# --------------------------------------------------------------------
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# --------------------------------------------------------------------
# Instalar aplicativos
# --------------------------------------------------------------------
choco install github -y
choco install poshgit -y
choco install curl -y
choco install virtualbox -y
# --------------------------------------------------------------------
# Instalar Docker
# --------------------------------------------------------------------
choco install docker-for-windows -y
choco install docker -y
choco install docker-machine -y
choco install docker-compose -y
docker --version
docker-compose --version
docker-machine --version
docker run hello-world
# --------------------------------------------------------------------
# Instalar Docker Machine
# --------------------------------------------------------------------
docker-machine create --driver virtualbox default
docker-machine ls
# --------------------------------------------------------------------
# Subir docker
# --------------------------------------------------------------------
mkdir C:\TempDesenv
cd C:\TempDesenv
git clone https://github.com/camillagds/react-todomvc.git
cd react-todomvc
docker build -f Dockerfile -t react-todomvc .
docker run -d --name app -p 8080:8080 react-todomvc
docker ps
#Test
sleep 5
docker ps -a | grep app
curl -l http://localhost:8080
docker exec -d app chmod +x /usr/src/app/test_app.sh
docker exec -d app sh /usr/src/app/test_app.sh