sitateru / kpt

1 stars 1 forks source link

Doesn't work `docker component` command on Windows #40

Closed ukitazume closed 5 years ago

ukitazume commented 5 years ago
$ docker-compose up -d
Creating network "kpt_default" with the default driver
Pulling db (postgres:10.4-alpine)...
10.4-alpine: Pulling from library/postgres
Creating kpt_db_1 ... error

ERROR: for kpt_db_1  Cannot create container for service db: b'Drive has not been shared'

ERROR: for db  Cannot create container for service db: b'Drive has not been shared'
Encountered errors while bringing up the project.

cc @jpper

ukitazume commented 5 years ago

The error occurs around mounting volume. plz check https://github.com/sitateru/kpt/blob/master/docker-compose.yml#L8

ukitazume commented 5 years ago

reference https://rominirani.com/docker-on-windows-mounting-host-directories-d96f3f056a2c

ukitazume commented 5 years ago

ssh root@172.104.123.98 with the password

jonathanpperry commented 5 years ago

Current error:

$ docker-compose run web rake db:create db:migrate Starting kpt_db_1 ... done DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from require at /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:81) could not translate host name "db" to address: Name does not resolve Couldn't create 'kpt_development' database. Please check your configuration. rake aborted! PG::ConnectionBad: could not translate host name "db" to address: Name does not resolve /usr/local/bundle/gems/pg-1.1.4/lib/pg.rb:56:in initialize' /usr/local/bundle/gems/pg-1.1.4/lib/pg.rb:56:innew' /usr/local/bundle/gems/pg-1.1.4/lib/pg.rb:56:in connect' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:692:inconnect' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in initialize' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:48:innew' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in postgresql_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:811:innew_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:855:in checkout_new_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:834:intry_to_checkout_new_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:795:in acquire_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:523:incheckout' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1010:inretrieve_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_handling.rb:118:in retrieve_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_handling.rb:90:inconnection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/postgresql_database_tasks.rb:12:in connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/postgresql_database_tasks.rb:21:increate' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:119:in create' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:139:inblock in create_current' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:316:in block in each_current_configuration' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:313:ineach' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:313:in each_current_configuration' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:138:increate_current' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/railties/databases.rake:29:in block (2 levels) in <top (required)>' /usr/local/bundle/gems/rake-12.3.2/exe/rake:27:in<top (required)>' Tasks: TOP => db:create (See full trace by running task with --trace)