Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container not starting #46

Open
icemagno opened this issue May 17, 2018 · 2 comments
Open

Docker container not starting #46

icemagno opened this issue May 17, 2018 · 2 comments

Comments

@icemagno
Copy link

Commands:

  1. git clone https://github.com/RichardKnop/go-oauth2-server.git

  2. cd go-oauth2-server/

  3. docker build -t go-oauth2-server:latest .

  4. docker run -e ETCD_ENDPOINTS=localhost:2379 -p 8070:8080 --name go-oauth2-server go-oauth2-server:latest

Result:

Postgres is up - executing command:
NAME:
   go-oauth2-server - Go OAuth 2.0 Server

USAGE:
   go-oauth2-server [global options] command [command options] [arguments...]

VERSION:
   0.0.0

AUTHOR:
   Richard Knop <risoknop@gmail.com>

COMMANDS:
     migrate    run migrations
     loaddata   load data from fixture
     runserver  run web server
     help, h    Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --configBackend value  (default: "etcd")
   --help, -h             show help
   --version, -v          print the version

But the container is not running:

docker exec go-oauth2-server /go/bin/go-oauth2-server loaddata \
>   oauth/fixtures/scopes.yml \
>   oauth/fixtures/roles.yml \
>   oauth/fixtures/test_clients.yml

Error response from daemon: Container 1a61b8dfdc65cf13f91edd5d7f2ab954215e38f20e8cda629c94ed8adf034930 is not running

What I have done wrong ?

@icemagno
Copy link
Author

icemagno commented May 17, 2018

By the way what must be runnning at localhost:2379 ?

After start the container using command \bin\bash

app@1a61b8dfdc65:/go/src/github.com/RichardKnop/go-oauth2-server$ go-oauth2-server runserver
INFO: 2018/05/17 13:18:10 etcd.go:90 ETCD Endpoints: localhost:2379
FATAL: 2018/05/17 13:18:15 factory.go:71 dial tcp 127.0.0.1:2379: connect: connection refused
app@1a61b8dfdc65:/go/src/github.com/RichardKnop/go-oauth2-server$

@icemagno
Copy link
Author

Ok. Can run all now after use the docker compose option. All its fine.

How can I create clients ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant