Skip to content

Commit

Permalink
fix(Dockerfile): move to ubi-micro [OSD-8579]
Browse files Browse the repository at this point in the history
the previous solution was ok, but the current one is more compatible
with the security team

- bump golang to latest (1.17)
- fix secuirty vuln found with 'trivy image scan'
- use ubi-micro to allow code-scanning using 'clair'
- did a 'go mod vendor && go mod tidy'
- gofmt a file using 'gofmt -w <filename>'

related to observatorium#14
  • Loading branch information
georgettica committed Jan 24, 2022
1 parent cbe9f67 commit f3e4f55
Show file tree
Hide file tree
Showing 462 changed files with 54,216 additions and 25,370 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: golang:1.14.1
- image: golang:1.17.6
steps:
- checkout
- run: |
Expand All @@ -11,7 +11,7 @@ jobs:
lint:
docker:
- image: golang:1.14.1
- image: golang:1.17.6
steps:
- checkout
- run: |
Expand All @@ -20,7 +20,7 @@ jobs:
test:
docker:
- image: golang:1.14.1
- image: golang:1.17.6
steps:
- checkout
- run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.14.1-alpine3.11 as builder
FROM golang:1.17.6-alpine3.15 as builder

RUN apk add --update --no-cache ca-certificates tzdata git make bash && update-ca-certificates

Expand All @@ -7,7 +7,7 @@ WORKDIR /opt

RUN git update-index --refresh; make token-refresher

FROM scratch as runner
FROM redhat/ubi8-micro:8.5-596 as runner

COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /opt/token-refresher /bin/token-refresher
Expand Down
121 changes: 109 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,42 +1,139 @@
module github.com/observatorium/token-refresher

go 1.14
go 1.17

require (
github.com/campoy/embedmd v1.0.0
github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41 // indirect
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/go-kit/kit v0.10.0
github.com/metalmatze/signal v0.0.0-20201002154727-d0c16e42a3cf
github.com/observatorium/observatorium v0.1.2-0.20201001162514-585e9d38dea7
github.com/observatorium/up v0.0.0-20200603110215-8a20b4e48ac0
github.com/oklog/run v1.1.0
github.com/prometheus/client_golang v1.5.1
github.com/spf13/pflag v1.0.5
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
)

require (
cloud.google.com/go v0.46.3 // indirect
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/OneOfOne/xxhash v1.2.7 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
github.com/beevik/etree v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/brancz/gojsontoyaml v0.0.0-20191212081931-bf2969bbd742 // indirect
github.com/brancz/kube-rbac-proxy v0.5.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41 // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/dexidp/dex v0.0.0-20200512115545-709d4169d646 // indirect
github.com/fatih/color v1.9.0 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-chi/chi v4.0.4+incompatible // indirect
github.com/go-kit/kit v0.10.0
github.com/go-logfmt/logfmt v0.5.0 // indirect
github.com/go-pluto/styx v0.0.0-20200109161911-78a77eb717b4 // indirect
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
github.com/golang/protobuf v1.4.0 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/go-jsonnet v0.15.1-0.20200310221949-724650d358b6 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/gorilla/handlers v1.4.2 // indirect
github.com/gorilla/mux v1.7.3 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.14.3 // indirect
github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/instrumenta/kubeval v0.0.0-20200515185822-7721cbec724c // indirect
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/json-iterator/go v1.1.9 // indirect
github.com/jsonnet-bundler/jsonnet-bundler v0.3.1 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.3.0 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
github.com/metalmatze/signal v0.0.0-20201002154727-d0c16e42a3cf
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.3.2 // indirect
github.com/observatorium/observatorium v0.1.2-0.20201001162514-585e9d38dea7
github.com/observatorium/up v0.0.0-20200603110215-8a20b4e48ac0
github.com/oklog/run v1.1.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/olekukonko/tablewriter v0.0.1 // indirect
github.com/onsi/gomega v1.7.1 // indirect
github.com/open-policy-agent/opa v0.23.2 // indirect
github.com/opencontainers/runc v1.0.0-rc9 // indirect
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/prometheus/client_golang v1.5.1
github.com/peterh/liner v0.0.0-20170211195444-bf27d3ba8e1d // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.9.1 // indirect
github.com/prometheus/procfs v0.0.11 // indirect
github.com/prometheus/prometheus v1.8.2-0.20200305080338-7164b58945bb // indirect
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
github.com/russellhaering/goxmldsig v0.0.0-20180430223755-7acd5e4a6ef7 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/sirupsen/logrus v1.6.0 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/urfave/cli v1.22.2 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v0.0.0-20180816142147-da425ebb7609 // indirect
github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b // indirect
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 // indirect
go.opencensus.io v0.22.2 // indirect
go.uber.org/atomic v1.5.1 // indirect
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect
go.uber.org/automaxprocs v1.2.0 // indirect
go.uber.org/multierr v1.3.0 // indirect
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee // indirect
go.uber.org/zap v1.13.0 // indirect
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/mod v0.2.0 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 // indirect
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
google.golang.org/api v0.17.0 // indirect
google.golang.org/appengine v1.6.5 // indirect
google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36 // indirect
google.golang.org/grpc v1.27.1 // indirect
google.golang.org/protobuf v1.21.0 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/ini.v1 v1.57.0 // indirect
gopkg.in/ldap.v2 v2.5.1 // indirect
gopkg.in/square/go-jose.v2 v2.5.0 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
honnef.co/go/tools v0.0.1-2019.2.3 // indirect
k8s.io/apimachinery v0.18.0 // indirect
k8s.io/component-base v0.18.0 // indirect
k8s.io/klog v1.0.0 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)
Loading

0 comments on commit f3e4f55

Please sign in to comment.