-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·35 lines (27 loc) · 787 Bytes
/
build.sh
File metadata and controls
executable file
·35 lines (27 loc) · 787 Bytes
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
#!/bin/bash
#** Reset all
rm -r bin
docker rm $(docker ps -aq) -f
docker rmi client:1.0
docker rmi server:1.0
docker rmi router:base
docker rmi router:mcproxy
#** Setup for router
cd docker
source setup_infra.sh
cd ../
#** Setup for client
mkdir bin
mkdir -p bin/client/data/downloads
mkdir -p bin/client/data/torrents
cp -r src/cmd/clientGui/static bin/client
cd src/cmd/clientGui
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../../../bin/client/client server.go
cd ../../../
docker build -t client:1.0 -f ./docker/client/client.Dockerfile .
#** Setup for serverHttp
mkdir -p bin/server
cd src/cmd/serverHttp
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../../../bin/server/server main.go
cd ../../../
docker build -t server:1.0 -f ./docker/server/server.Dockerfile .