pglombardo / PasswordPusher

🔐 Securely share sensitive information with automatic expiration & deletion after a set number of views or duration. Track who, what and when with full audit logs.
https://docs.pwpush.com
Apache License 2.0
2.09k stars 357 forks source link

Dockerfile build fails for passwordpusher-postgres #89

Closed mjmayer closed 6 years ago

mjmayer commented 6 years ago

The command docker build . is failing when using PasswordPusher/containerization/passwordpusher-postgres/Dockerfile

This is the output of the build command. It seems the build is failing because it can't reach the postgres server or more specifically it can't resolve the dns name postgres. The computer I'm building this on does not have access to the external postgres server. Can the docker image be built without access to the postgres server?

Bundle complete! 22 Gemfile dependencies, 73 gems now installed.
Gems in the groups development, private and test were not installed.
Bundled gems are installed into `./vendor/bundle`
A, [2018-06-20T23:33:08.003600 #14889]   ANY -- : Stan is on the scene.  Starting Instana instrumentation.
sh: 1: /sbin/ip: not found
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
rake aborted!
PG::ConnectionBad: could not translate host name "postgres" to address: Temporary failure in name resolution
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_handling.rb:87:in `connection'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/instana-1.7.11/lib/instana/frameworks/instrumentation/active_record.rb:26:in `<top (required)>'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/instana-1.7.11/lib/instana/frameworks/rails.rb:21:in `block in <class:Railtie>'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:44:in `each'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `instance_exec'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `run'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/initializable.rb:54:in `run_initializers'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application.rb:352:in `initialize!'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `public_send'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `method_missing'
/opt/PasswordPusher/config/environment.rb:42:in `<top (required)>'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application.rb:328:in `require'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application.rb:328:in `require_environment!'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/railties-4.2.10/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/opt/PasswordPusher/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
W, [2018-06-20T23:33:08.070310 #14889]  WARN -- : Instana: Host agent not available.  Will retry periodically.
The command '/bin/sh -c bundle install --without development private test --deployment &&     bundle exec rake assets:precompile &&     RAILS_ENV=production' returned a non-zero code: 1
pglombardo commented 6 years ago

Hi @mjmayer - thanks for reporting this and sorry for the issue. I believe this has been fixed now. Could you git pull and try again to confirm? Thanks.

pglombardo commented 6 years ago

I confirmed that this is fixed locally. I'm going to close but if you still have an issue, feel free to re-open or file another issue. Thanks for pointing this out!