validator is now login-validator and is part of the server image
This commit is contained in:
parent
fd58db5eb1
commit
ee6fbe3e74
22
pkg/login-validator/Dockerfile
Normal file
22
pkg/login-validator/Dockerfile
Normal 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"]}'
|
1
pkg/login-validator/build.yml
Normal file
1
pkg/login-validator/build.yml
Normal file
@ -0,0 +1 @@
|
||||
image: adlin-login-validator
|
@ -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"))
|
||||
}
|
Reference in New Issue
Block a user