Closed milenkozahovic closed 7 years ago
Check the logs of the docker container, you probably didn't set DATABASE_URL
Looks like the container is not executed in background after it run.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7e44b5470586 oryd/hydra "/bin/sh -c '/go/b..." 7 minutes ago Exited (1) 7 minutes ago my-hydra
It is, just check the logs, it will show you why it didn't start. The container is working fine in prod here ;)
If you point me to the section that showed this command, I'll update it accordingly so the container is able to boot properly. 99% missing database url
I just setup the DATABASE_URL to memory and run the container, and got error message that indicate DATABASE_URL was not set.
time="2017-05-30T09:09:53Z" level=fatal msg="DATABASE_URL is not set, use "export DATABASE_URL=memory" for an in memory storage or the documented database adapters."
weird
You need to set -e
, see: https://docs.docker.com/engine/reference/commandline/run/
I run this command and the container still not running:
docker run -d --name my-hydra -p 4444:4444 oryd/hydra -e "DATABASE_URL=memory"
Also the log message is the same with previous one.
you can't pass flags after arguments in almost all CLIs, the right order is: docker run -d --name my-hydra -p 4444:4444 -e "DATABASE_URL=memory" oryd/hydra
thanks a lot. my bad :) :+1:
glad you got it working! would you mind updating the section where you found the broken docker command? :) all the docs reside in https://github.com/ory/hydra/tree/master/docs
yeeeah no problem. thank you again. I think this should be fixed too.
Another problem occurs when i try following command:
docker exec -i -t e92543e0a50e /bin/bash
and got this error:
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory"
Oh yeah that needs to be /bin/sh
ok. it works now, the command should be:
docker exec -i -t e92543e0a50e /bin/sh
thank you
ubuntu@ip-172-31-57-106:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5b49f071819b oryd/hydra:v0.10.0-alpha.18 "hydra host" About an hour ago Up About an hour 0.0.0.0:9000->4444/tcp ory-hydra-example--hydra
e6697ba0787a postgres:9.6 "docker-entrypoint..." 2 hours ago Up 2 hours 5432/tcp ory-hydra-example--postgres
ubuntu@ip-172-31-57-106:~$ sudo docker exec -i -t 5b49f071819b /bin/sh
oci runtime error: exec failed: container_linux.go:265: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory"
I am getting this error, it seems there is now no shell at all in the image
Yes, you can't SSH in any more, but you can do docker exec -i -t 5b49f071819b help
or any other hydra command.
Thanks, I got it to work with docker exec -i -t 5b49f071819b hydra help
Why was the ability to bash in removed?
you can create an image based on the 15mb hydra image with bash. hydra does not need bash so saving 400mb for full blown linux is the reason.
On 6. Sep 2019, at 13:04, Tom Gouder notifications@github.com wrote:
Why was the ability to bash in removed?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Ah, understood - smart to remove it if it was so heavy previously 👍 Thanks for explaining!
I got this error when I run this command docker exec -i -t laradock_redis bash.
I try to run a hydra container by using this command
docker run -d --name my-hydra -p 4444:4444 oryd/hydra
then try to exec shell from the container:
docker exec -i -t <container-id> /bin/bash
then i got following error:
Error response from daemon: Container 7e44b5470586470dc2284623c3bd2f466386136524486210d6495cff7ada1964 is not running