trying to build a hydra image using docker and then connecting it to postgres container running in docker in the same network.
but
This error comes:
level=fatal msg="Unable to instantiate service registry." error="no driver is capable of handling the given DSN"
This error keeps on coming when trying to run the image.
Built binary using
GO111MODULE=on GOOS=linux GOARCH=amd64 go build && docker build -t hydratest:v1 .
Dockerfile
FROM alpine:3.9
RUN apk add -U --no-cache ca-certificates
FROM scratch
COPY hydra /usr/bin/hydra
ENTRYPOINT ["hydra"]
CMD ["serve", "all"]
running image using:
docker run -d --name hydratest --network hydraguide -p 9000:4444 -p 9001:4445 -e SECRETS_SYSTEM=jayvcjaw5214521 -e URLS_SELF_ISSUER=https://localhost:9000/ -e URLS_CONSENT=http://localhost:3000/consent -e URLS_LOGIN=http://localhost:3000/login hydratest:v1 serve all
You did not set configuration variable dsn. Please read the documentation.
For what it's worth, I've ran into the same issue when installing Hydra from the Helm chart, as I had put the dsn in the wrong place in the values.yaml file, and no amount of helm update 'ing the chart helped. Long story short... Purging the chart with helm del --purge hydra and reinstalling it worked for me.
I have the same error, please any own of you can help me to create the code I am a student and I have no "huge" idea of docker's commands

trying to build a hydra image using docker and then connecting it to postgres container running in docker in the same network.
but
This error comes:level=fatal msg="Unable to instantiate service registry." error="no driver is capable of handling the given DSN"
This error keeps on coming when trying to run the image.
Built binary using
GO111MODULE=on GOOS=linux GOARCH=amd64 go build && docker build -t hydratest:v1 .Dockerfile
FROM alpine:3.9
RUN apk add -U --no-cache ca-certificates
FROM scratchCOPY hydra /usr/bin/hydra
ENTRYPOINT ["hydra"]
CMD ["serve", "all"]running image using:
docker run -d --name hydratest --network hydraguide -p 9000:4444 -p 9001:4445 -e SECRETS_SYSTEM=jayvcjaw5214521 -e URLS_SELF_ISSUER=https://localhost:9000/ -e URLS_CONSENT=http://localhost:3000/consent -e URLS_LOGIN=http://localhost:3000/login hydratest:v1 serve all
$ docker run -d \
--name ory-hydra-example--hydra \
--network hydraguide \
-p 9000:4444 \
-p 9001:4445 \
-e SECRETS_SYSTEM=$SECRETS_SYSTEM \
-e DSN=$DSN \
-e URLS_SELF_ISSUER=https://localhost:9000/ \
-e URLS_CONSENT=http://localhost:9020/consent \
-e URLS_LOGIN=http://localhost:9020/login \
oryd/hydra:1.4.2 serve all