validator is now login-validator and is part of the server image

This commit is contained in:
nemunaire 2018-02-19 23:11:02 +01:00
parent fd58db5eb1
commit ee6fbe3e74
11 changed files with 23 additions and 5 deletions

View File

@ -0,0 +1,22 @@
FROM golang:alpine as gobuild
RUN apk add --no-cache git
WORKDIR /go/src/login-validator
ADD cmd ./
RUN go get -d -v
RUN go build -v
FROM alpine
MAINTAINER Pierre-Olivier Mercier <nemunaire@nemunai.re>
EXPOSE 8081
COPY --from=gobuild /go/src/login-validator/login-validator /bin/login-validator
ENTRYPOINT ["/bin/login-validator", "-bind=:8081"]
LABEL org.mobyproject.config='{"capabilities": ["CAP_NET_BIND_SERVICE"]}'

View File

@ -0,0 +1 @@
image: adlin-login-validator

View File

@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"io/ioutil"
"log"
"net"
"os"
"path"
@ -43,7 +42,3 @@ func registerUser(filename string, username string) error {
}
return nil
}
func init() {
log.Println(RegisterUserMAC(net.IPv4(192, 168, 23, 21), "mercie_d"))
}