added client Makefile
This commit is contained in:
2
client/golang/Makefile
Normal file
2
client/golang/Makefile
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
build:
|
||||||
|
go build -ldflags="-s -w" -o saprus client.go
|
||||||
@@ -102,8 +102,8 @@ func main() {
|
|||||||
// Listen timeout
|
// Listen timeout
|
||||||
select {
|
select {
|
||||||
case returnMSG := <- addrChan:
|
case returnMSG := <- addrChan:
|
||||||
fmt.Printf("Discovery Server: %s\n", strings.Fields(returnMSG)[1])
|
fmt.Printf("%s\n", strings.Fields(returnMSG)[1])
|
||||||
case <- time.After(5 * time.Second):
|
case <- time.After(5 * time.Second):
|
||||||
fmt.Printf("Discovery Server not found\n")
|
fmt.Printf("error\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
9
server/Dockerfile
Normal file
9
server/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
FROM golang:1.18.2-alpine
|
||||||
|
|
||||||
|
RUN mkdir -p /src
|
||||||
|
|
||||||
|
COPY server.go /src
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
RUN go build server.go
|
||||||
2
server/Makefile
Normal file
2
server/Makefile
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
docker_build:
|
||||||
|
docker build . -t saprus_server:latest
|
||||||
Reference in New Issue
Block a user