Skip to content

Commit

Permalink
FEATURE: support non-root
Browse files Browse the repository at this point in the history
binding on port 80 needs root or extended capabilities. changing to a higher port supports non-root execution.
  • Loading branch information
bpereto committed Feb 14, 2022
1 parent 12d9acf commit e63b797
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/whoami/whoami .

ENTRYPOINT ["/whoami"]
EXPOSE 80
EXPOSE 8000
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func init() {
flag.StringVar(&cert, "cert", "", "give me a certificate")
flag.StringVar(&key, "key", "", "give me a key")
flag.StringVar(&ca, "cacert", "", "give me a CA chain, enforces mutual TLS")
flag.StringVar(&port, "port", getEnv("WHOAMI_PORT_NUMBER", "80"), "give me a port number")
flag.StringVar(&port, "port", getEnv("WHOAMI_PORT_NUMBER", "8000"), "give me a port number")
flag.StringVar(&name, "name", os.Getenv("WHOAMI_NAME"), "give me a name")
}

Expand Down

0 comments on commit e63b797

Please sign in to comment.