ory / oathkeeper

A cloud native Identity & Access Proxy / API (IAP) and Access Control Decision API that authenticates, authorizes, and mutates incoming HTTP(s) requests. Inspired by the BeyondCorp / Zero Trust white paper. Written in Go.
https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=hydra
Apache License 2.0
3.25k stars 359 forks source link

Dockerfile-dc doesn't build #796

Closed radekg closed 2 years ago

radekg commented 3 years ago

Describe the bug

Building with Dockerfile-dc doesn't work from the 0.38.14-beta.1 branch.

Reproducing the bug

Steps to reproduce the behavior:

Running:

docker build -t ory-kratos:v0.38.14-beta.1 -f Dockerfile-dc .

Produces:

[+] Building 51.0s (12/12) FINISHED
 => [internal] load build definition from Dockerfile-dc                                                                                                                                                                                                                                                                                                              0.0s
 => => transferring dockerfile: 399B                                                                                                                                                                                                                                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                                    0.0s
 => => transferring context: 67B                                                                                                                                                                                                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/golang:1.16-alpine                                                                                                                                                                                                                                                                                                0.0s
 => CACHED [1/8] FROM docker.io/library/golang:1.16-alpine                                                                                                                                                                                                                                                                                                           0.0s
 => [internal] load build context                                                                                                                                                                                                                                                                                                                                    3.3s
 => => transferring context: 113.97MB                                                                                                                                                                                                                                                                                                                                3.3s
 => [2/8] RUN addgroup -S ory;     adduser -S ory -G ory -D -H -s /bin/nologin                                                                                                                                                                                                                                                                                       0.8s
 => [3/8] RUN apk add -U --no-cache ca-certificates                                                                                                                                                                                                                                                                                                                  2.8s
 => [4/8] ADD . /app                                                                                                                                                                                                                                                                                                                                                 0.5s
 => [5/8] WORKDIR /app                                                                                                                                                                                                                                                                                                                                               0.0s
 => [6/8] RUN go get -u github.com/gobuffalo/packr/v2/packr2                                                                                                                                                                                                                                                                                                        31.3s
 => [7/8] RUN packr2                                                                                                                                                                                                                                                                                                                                                 0.5s
 => ERROR [8/8] RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build                                                                                                                                                                                                                                                                                                  14.8s
------
 > [8/8] RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build:
#12 0.498 go: downloading github.com/ory/x v0.0.163
#12 0.500 go: downloading github.com/ory/jsonschema/v3 v3.0.1
#12 0.951 go: downloading github.com/ory/analytics-go/v4 v4.0.1
#12 0.951 go: downloading github.com/ory/graceful v0.1.1
#12 0.953 go: downloading github.com/ory/viper v1.7.5
#12 0.959 go: downloading github.com/pkg/errors v0.9.1
#12 0.995 go: downloading github.com/prometheus/client_golang v1.5.0
#12 1.014 go: downloading github.com/urfave/negroni v1.0.0
#12 1.018 go: downloading github.com/go-openapi/runtime v0.19.20
#12 1.063 go: downloading github.com/go-openapi/strfmt v0.19.5
#12 1.134 go: downloading github.com/go-openapi/errors v0.19.6
#12 1.146 go: downloading github.com/go-openapi/swag v0.19.9
#12 1.147 go: downloading github.com/Masterminds/sprig/v3 v3.1.0
#12 1.175 go: downloading github.com/julienschmidt/httprouter v1.2.0
#12 1.197 go: downloading github.com/ory/herodot v0.8.4
#12 1.203 go: downloading go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.13.0
#12 1.219 go: downloading gopkg.in/square/go-jose.v2 v2.5.1
#12 1.229 go: downloading github.com/fsnotify/fsnotify v1.4.9
#12 1.241 go: downloading github.com/mitchellh/go-homedir v1.1.0
#12 1.263 go: downloading github.com/spf13/cast v1.3.1
#12 1.314 go: downloading github.com/tidwall/gjson v1.6.7
#12 1.317 go: downloading github.com/pkg/profile v1.2.1
#12 1.338 go: downloading github.com/imdario/mergo v0.3.8
#12 1.339 go: downloading github.com/ory/fosite v0.36.1
#12 1.355 go: downloading github.com/ory/go-convenience v0.1.0
#12 1.398 go: downloading github.com/ory/gojsonschema v1.2.0
#12 1.401 go: downloading github.com/rs/cors v1.6.0
#12 1.411 go: downloading github.com/pborman/uuid v1.2.0
#12 1.451 go: downloading github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3
#12 1.544 go: downloading github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c
#12 1.669 go: downloading github.com/dgraph-io/ristretto v0.0.2
#12 1.687 go: downloading github.com/hashicorp/hcl v1.0.0
#12 1.732 go: downloading github.com/spf13/jwalterweatherman v1.1.0
#12 1.762 go: downloading github.com/subosito/gotenv v1.2.0
#12 1.767 go: downloading github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535
#12 1.768 go: downloading go.mongodb.org/mongo-driver v1.3.5
#12 1.826 go: downloading github.com/prometheus/client_model v0.2.0
#12 1.863 go: downloading github.com/prometheus/common v0.9.1
#12 1.940 go: downloading github.com/mailru/easyjson v0.7.1
#12 2.420 go: downloading github.com/cenkalti/backoff v2.2.1+incompatible
#12 2.565 go: downloading github.com/Masterminds/goutils v1.1.0
#12 2.612 go: downloading github.com/Masterminds/semver v1.4.2
#12 2.650 go: downloading github.com/Masterminds/semver/v3 v3.1.0
#12 2.722 go: downloading github.com/huandu/xstrings v1.3.1
#12 2.765 go: downloading github.com/mitchellh/copystructure v1.0.0
#12 2.804 go: downloading go.opentelemetry.io/otel v0.13.0
#12 2.898 go: downloading github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2
#12 2.902 go: downloading github.com/form3tech-oss/jwt-go v3.2.2+incompatible
#12 2.902 go: downloading gocloud.dev v0.20.0
#12 3.605 go: downloading github.com/opentracing/opentracing-go v1.2.0
#12 3.606 go: downloading github.com/blang/semver v3.5.1+incompatible
#12 3.606 go: downloading github.com/dlclark/regexp2 v1.2.0
#12 3.654 go: downloading github.com/ghodss/yaml v1.0.0
#12 3.658 go: downloading github.com/gobwas/glob v0.2.3
#12 3.658 go: downloading github.com/ory/ladon v1.1.0
#12 3.765 go: downloading github.com/tidwall/sjson v1.1.1
#12 3.788 go: downloading github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce
#12 3.797 go: downloading github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5
#12 3.824 go: downloading github.com/openzipkin/zipkin-go v0.2.2
#12 3.838 go: downloading github.com/uber/jaeger-client-go v2.22.1+incompatible
#12 3.897 go: downloading go.elastic.co/apm v1.8.0
#12 3.972 go: downloading gopkg.in/DataDog/dd-trace-go.v1 v1.27.1
#12 4.019 go: downloading go.elastic.co/apm/module/apmot v1.8.0
#12 4.026 go: downloading github.com/tidwall/match v1.0.3
#12 4.094 go: downloading github.com/tidwall/pretty v1.0.2
#12 4.096 go: downloading github.com/beorn7/perks v1.0.1
#12 4.130 go: downloading github.com/cespare/xxhash v1.1.0
#12 4.136 go: downloading github.com/prometheus/procfs v0.0.8
#12 4.164 go: downloading github.com/ory/gojsonreference v0.0.0-20190720135523-6b606c2d8ee8
#12 4.167 go: downloading github.com/form3tech-oss/jwt-go v1.0.3-0.20210625141045-a211650c6ae1
#12 4.169 go: downloading github.com/cespare/xxhash/v2 v2.1.1
#12 4.206 go: downloading github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
#12 4.208 go: downloading github.com/go-openapi/analysis v0.19.10
#12 4.227 go: downloading github.com/go-openapi/loads v0.19.5
#12 4.242 go: downloading github.com/go-openapi/spec v0.19.8
#12 4.245 go: downloading github.com/go-openapi/validate v0.19.10
#12 4.312 go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
#12 4.323 go: downloading github.com/mitchellh/reflectwalk v1.0.0
#12 4.383 go: downloading github.com/Azure/azure-pipeline-go v0.2.2
#12 4.466 go: downloading github.com/Azure/azure-storage-blob-go v0.9.0
#12 4.468 go: downloading github.com/aws/aws-sdk-go v1.31.13
#12 4.615 go: downloading github.com/google/go-replayers/httpreplay v0.1.0
#12 4.730 go: downloading github.com/google/wire v0.4.0
#12 9.607 go: downloading github.com/googleapis/gax-go v2.0.2+incompatible
#12 9.607 go: downloading github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492
#12 9.610 go: downloading github.com/uber/jaeger-lib v2.2.0+incompatible
#12 9.615 go: downloading github.com/elastic/go-sysinfo v1.1.1
#12 9.748 go: downloading github.com/googleapis/gax-go/v2 v2.0.5
#12 9.757 go: downloading go.elastic.co/fastjson v1.0.0
#12 9.764 go: downloading go.elastic.co/apm/module/apmhttp v1.8.0
#12 9.764 go: downloading github.com/DataDog/datadog-go v4.0.0+incompatible
#12 9.788 go: downloading github.com/tinylib/msgp v1.1.2
#12 9.794 go: downloading golang.org/x/time v0.0.0-20191024005414-555d28b269f0
#12 9.813 go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
#12 9.822 go: downloading github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb
#12 9.840 go: downloading github.com/go-openapi/jsonpointer v0.19.3
#12 9.862 go: downloading github.com/go-stack/stack v1.8.0
#12 9.863 go: downloading github.com/go-openapi/jsonreference v0.19.4
#12 9.864 go: downloading github.com/mattn/go-ieproxy v0.0.1
#12 9.908 go: downloading github.com/armon/go-radix v1.0.0
#12 9.909 go: downloading github.com/philhofer/fwd v1.0.0
#12 9.909 go: downloading github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible
#12 10.03 go: downloading github.com/jmespath/go-jmespath v0.3.0
#12 10.03 go: downloading howett.net/plist v0.0.0-20181124034731-591f970eefbb
#12 10.03 go: downloading github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901
#12 10.03 go: downloading github.com/PuerkitoBio/purell v1.1.1
#12 10.10 go: downloading github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
#12 14.69 /go/pkg/mod/gocloud.dev@v0.20.0/blob/gcsblob/gcsblob.go:72:2: missing go.sum entry for module providing package cloud.google.com/go/compute/metadata (imported by gocloud.dev/blob/gcsblob); to add:
#12 14.69   go get gocloud.dev/blob/gcsblob@v0.20.0
#12 14.69 /go/pkg/mod/gocloud.dev@v0.20.0/blob/gcsblob/iam.go:25:2: missing go.sum entry for module providing package cloud.google.com/go/iam/credentials/apiv1 (imported by gocloud.dev/blob/gcsblob); to add:
#12 14.69   go get gocloud.dev/blob/gcsblob@v0.20.0
#12 14.69 /go/pkg/mod/gocloud.dev@v0.20.0/blob/gcsblob/gcsblob.go:73:2: missing go.sum entry for module providing package cloud.google.com/go/storage (imported by gocloud.dev/blob/gcsblob); to add:
#12 14.69   go get gocloud.dev/blob/gcsblob@v0.20.0
#12 14.69 /go/pkg/mod/github.com/prometheus/client_golang@v1.5.0/prometheus/desc.go:23:2: missing go.sum entry for module providing package github.com/golang/protobuf/proto (imported by github.com/prometheus/client_golang/prometheus); to add:
#12 14.69   go get github.com/prometheus/client_golang/prometheus@v1.5.0
#12 14.69 /go/pkg/mod/github.com/prometheus/client_golang@v1.5.0/prometheus/value.go:23:2: missing go.sum entry for module providing package github.com/golang/protobuf/ptypes (imported by github.com/prometheus/client_golang/prometheus); to add:
#12 14.69   go get github.com/prometheus/client_golang/prometheus@v1.5.0
#12 14.69 /go/pkg/mod/github.com/prometheus/client_model@v0.2.0/go/metrics.pb.go:9:2: missing go.sum entry for module providing package github.com/golang/protobuf/ptypes/timestamp (imported by github.com/prometheus/client_model/go); to add:
#12 14.69   go get github.com/prometheus/client_model/go@v0.2.0
#12 14.69 /go/pkg/mod/github.com/pborman/uuid@v1.2.0/marshal.go:11:2: missing go.sum entry for module providing package github.com/google/uuid (imported by github.com/ory/x/jwksx); to add:
#12 14.69   go get github.com/ory/x/jwksx@v0.0.163
#12 14.69 /go/pkg/mod/github.com/ory/viper@v1.7.5/viper.go:42:2: missing go.sum entry for module providing package github.com/magiconair/properties (imported by github.com/ory/viper); to add:
#12 14.69   go get github.com/ory/viper@v1.7.5
#12 14.69 /go/pkg/mod/github.com/ory/viper@v1.7.5/viper.go:43:2: missing go.sum entry for module providing package github.com/mitchellh/mapstructure (imported by github.com/ory/viper); to add:
#12 14.69   go get github.com/ory/viper@v1.7.5
#12 14.69 /go/pkg/mod/github.com/ory/viper@v1.7.5/viper.go:44:2: missing go.sum entry for module providing package github.com/pelletier/go-toml (imported by github.com/ory/viper); to add:
#12 14.69   go get github.com/ory/viper@v1.7.5
#12 14.69 /go/pkg/mod/github.com/ory/viper@v1.7.5/util.go:21:2: missing go.sum entry for module providing package github.com/spf13/afero (imported by github.com/ory/viper); to add:
#12 14.69   go get github.com/ory/viper@v1.7.5
#12 14.69 internal/cloudstorage/setup.go:13:2: missing go.sum entry for module providing package github.com/stretchr/testify/require (imported by github.com/ory/x/cmdx); to add:
#12 14.69   go get github.com/ory/x/cmdx@v0.0.163
#12 14.69 /go/pkg/mod/gocloud.dev@v0.20.0/internal/oc/metrics.go:19:2: missing go.sum entry for module providing package go.opencensus.io/plugin/ocgrpc (imported by gocloud.dev/internal/oc); to add:
#12 14.69   go get gocloud.dev/internal/oc@v0.20.0
#12 14.69 /go/pkg/mod/gocloud.dev@v0.20.0/blob/blob.go:81:2: missing go.sum entry for module providing package go.opencensus.io/stats (imported by gocloud.dev/blob); to add:
#12 14.69   go get gocloud.dev/blob@v0.20.0
#12 14.69 /go/pkg/mod/gocloud.dev@v0.20.0/blob/blob.go:82:2: missing go.sum entry for module providing package go.opencensus.io/stats/view (imported by gocloud.dev/blob); to add:
#12 14.69   go get gocloud.dev/blob@v0.20.0
#12 14.69 /go/pkg/mod/gocloud.dev@v0.20.0/blob/blob.go:83:2: missing go.sum entry for module providing package go.opencensus.io/tag (imported by gocloud.dev/blob); to add:
#12 14.69   go get gocloud.dev/blob@v0.20.0
#12 14.69 /go/pkg/mod/gocloud.dev@v0.20.0/internal/oc/trace.go:25:2: missing go.sum entry for module providing package go.opencensus.io/trace (imported by gocloud.dev/internal/oc); to add:
#12 14.69   go get gocloud.dev/internal/oc@v0.20.0
#12 14.69 /go/pkg/mod/github.com/uber/jaeger-client-go@v2.22.1+incompatible/span_context.go:24:2: missing go.sum entry for module providing package go.uber.org/atomic (imported by github.com/uber/jaeger-client-go); to add:
#12 14.69   go get github.com/uber/jaeger-client-go@v2.22.1+incompatible
#12 14.70 /go/pkg/mod/github.com/!puerkito!bio/purell@v1.1.1/purell.go:17:2: missing go.sum entry for module providing package golang.org/x/net/idna (imported by github.com/PuerkitoBio/purell); to add:
#12 14.70   go get github.com/PuerkitoBio/purell@v1.1.1
#12 14.70 /go/pkg/mod/gocloud.dev@v0.20.0/gcp/gcp.go:24:2: missing go.sum entry for module providing package golang.org/x/oauth2 (imported by github.com/ory/oathkeeper/pipeline/authn); to add:
#12 14.70   go get github.com/ory/oathkeeper/pipeline/authn
#12 14.70 pipeline/authn/authenticator_oauth2_client_credentials.go:19:2: missing go.sum entry for module providing package golang.org/x/oauth2/clientcredentials (imported by github.com/ory/oathkeeper/pipeline/authn); to add:
#12 14.70   go get github.com/ory/oathkeeper/pipeline/authn
#12 14.70 /go/pkg/mod/gocloud.dev@v0.20.0/gcp/gcp.go:25:2: missing go.sum entry for module providing package golang.org/x/oauth2/google (imported by gocloud.dev/blob/gcsblob); to add:
#12 14.70   go get gocloud.dev/blob/gcsblob@v0.20.0
#12 14.70 /go/pkg/mod/github.com/!puerkito!bio/purell@v1.1.1/purell.go:18:2: missing go.sum entry for module providing package golang.org/x/text/unicode/norm (imported by github.com/PuerkitoBio/purell); to add:
#12 14.70   go get github.com/PuerkitoBio/purell@v1.1.1
#12 14.70 /go/pkg/mod/github.com/!puerkito!bio/purell@v1.1.1/purell.go:19:2: missing go.sum entry for module providing package golang.org/x/text/width (imported by github.com/PuerkitoBio/purell); to add:
#12 14.70   go get github.com/PuerkitoBio/purell@v1.1.1
#12 14.70 /go/pkg/mod/gocloud.dev@v0.20.0/blob/gcsblob/gcsblob.go:76:2: missing go.sum entry for module providing package google.golang.org/api/googleapi (imported by gocloud.dev/blob/gcsblob); to add:
#12 14.70   go get gocloud.dev/blob/gcsblob@v0.20.0
#12 14.70 /go/pkg/mod/gocloud.dev@v0.20.0/blob/gcsblob/gcsblob.go:77:2: missing go.sum entry for module providing package google.golang.org/api/iterator (imported by gocloud.dev/blob/gcsblob); to add:
#12 14.70   go get gocloud.dev/blob/gcsblob@v0.20.0
#12 14.70 /go/pkg/mod/github.com/google/go-replayers/httpreplay@v0.1.0/google/google.go:23:2: missing go.sum entry for module providing package google.golang.org/api/option (imported by github.com/ory/oathkeeper/internal/cloudstorage); to add:
#12 14.70   go get github.com/ory/oathkeeper/internal/cloudstorage
#12 14.70 /go/pkg/mod/github.com/google/go-replayers/httpreplay@v0.1.0/google/google.go:24:2: missing go.sum entry for module providing package google.golang.org/api/transport/http (imported by github.com/google/go-replayers/httpreplay/google); to add:
#12 14.70   go get github.com/google/go-replayers/httpreplay/google@v0.1.0
#12 14.70 /go/pkg/mod/gocloud.dev@v0.20.0/blob/gcsblob/iam.go:27:2: missing go.sum entry for module providing package google.golang.org/genproto/googleapis/iam/credentials/v1 (imported by gocloud.dev/blob/gcsblob); to add:
#12 14.70   go get gocloud.dev/blob/gcsblob@v0.20.0
#12 14.70 /go/pkg/mod/github.com/googleapis/gax-go@v2.0.2+incompatible/call_option.go:36:2: missing go.sum entry for module providing package google.golang.org/grpc (imported by gocloud.dev/internal/useragent); to add:
#12 14.70   go get gocloud.dev/internal/useragent@v0.20.0
#12 14.70 /go/pkg/mod/github.com/googleapis/gax-go@v2.0.2+incompatible/call_option.go:37:2: missing go.sum entry for module providing package google.golang.org/grpc/codes (imported by gocloud.dev/internal/gcerr); to add:
#12 14.70   go get gocloud.dev/internal/gcerr@v0.20.0
#12 14.70 /go/pkg/mod/github.com/openzipkin/zipkin-go@v0.2.2/propagation/b3/grpc.go:18:2: missing go.sum entry for module providing package google.golang.org/grpc/metadata (imported by github.com/openzipkin/zipkin-go/propagation/b3); to add:
#12 14.70   go get github.com/openzipkin/zipkin-go/propagation/b3@v0.2.2
#12 14.70 /go/pkg/mod/github.com/googleapis/gax-go@v2.0.2+incompatible/call_option.go:38:2: missing go.sum entry for module providing package google.golang.org/grpc/status (imported by gocloud.dev/internal/gcerr); to add:
#12 14.70   go get gocloud.dev/internal/gcerr@v0.20.0
#12 14.70 /go/pkg/mod/github.com/ory/viper@v1.7.5/viper.go:50:2: missing go.sum entry for module providing package gopkg.in/ini.v1 (imported by github.com/ory/viper); to add:
#12 14.70   go get github.com/ory/viper@v1.7.5
#12 14.70 /go/pkg/mod/github.com/ory/viper@v1.7.5/viper.go:51:2: missing go.sum entry for module providing package gopkg.in/yaml.v2 (imported by github.com/ory/x/viperx); to add:
#12 14.70   go get github.com/ory/x/viperx@v0.0.163
------
executor failed running [/bin/sh -c CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build]: exit code: 1
aeneasr commented 3 years ago

Thank you for the report, running go mod tidy in the project root should resolve these issues!

github-actions[bot] commented 2 years ago

Hello contributors!

I am marking this issue as stale as it has not received any engagement from the community or maintainers a year. That does not imply that the issue has no merit! If you feel strongly about this issue

Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.

Unfortunately, burnout has become a topic of concern amongst open-source projects.

It can lead to severe personal and health issues as well as opening catastrophic attack vectors.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.

If this issue was marked as stale erroneous you can exempt it by adding the backlog label, assigning someone, or setting a milestone for it.

Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!

Thank you 🙏✌️