Skip to content

Commit

Permalink
add nonroot
Browse files Browse the repository at this point in the history
  • Loading branch information
lghinet committed Mar 25, 2022
1 parent adfbfb0 commit 33af11c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions cmd/rusid/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"flag"
"k8s.io/klog/v2"
"net/http"
_ "net/http/pprof"
//_ "net/http/pprof"
"os"
"os/signal"
"runtime/debug"
Expand All @@ -32,10 +32,6 @@ func main() {
klog.InitFlags(nil)
defer klog.Flush()

go func() {
http.ListenAndServe("localhost:6060", nil)
}()

cfgBuilder := runtime.NewRuntimeConfigBuilder()
cfgBuilder.AttachCmdFlags(flag.StringVar, flag.BoolVar, flag.IntVar)
flag.Parse()
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine:latest as alpine
RUN apk add -U --no-cache ca-certificates
# current directory must be ./dist

FROM ubuntu
FROM gcr.io/distroless/static:nonroot
ARG PKG_FILES
WORKDIR /
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
Expand Down

0 comments on commit 33af11c

Please sign in to comment.