Module: Dapp::Dapp::Deps::Toolchain
- Included in:
- Dapp::Dapp
- Defined in:
- lib/dapp/dapp/deps/toolchain.rb
Constant Summary collapse
- TOOLCHAIN_VERSION =
"0.1.1"
Instance Method Summary collapse
- #toolchain_container ⇒ Object
-
#toolchain_container_name ⇒ Object
FIXME: hashsum(image) or dockersafe().
Instance Method Details
#toolchain_container ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dapp/dapp/deps/toolchain.rb', line 11 def toolchain_container @toolchain_container ||= begin is_container_exist = proc {shellout("#{host_docker} inspect #{toolchain_container_name}").exitstatus.zero?} if !is_container_exist.call lock("dappdeps.container.#{toolchain_container_name}", default_timeout: 600) do if !is_container_exist.call log_secondary_process(t(code: 'process.toolchain_container_creating', data: {name: toolchain_container_name}), short: true) do shellout!( ["#{host_docker} create", "--name #{toolchain_container_name}", "--volume /.dapp/deps/toolchain/#{TOOLCHAIN_VERSION} dappdeps/toolchain:#{TOOLCHAIN_VERSION}"].join(' ') ) end end end end toolchain_container_name end end |
#toolchain_container_name ⇒ Object
FIXME: hashsum(image) or dockersafe()
7 8 9 |
# File 'lib/dapp/dapp/deps/toolchain.rb', line 7 def toolchain_container_name # FIXME: hashsum(image) or dockersafe() "dappdeps_toolchain_#{TOOLCHAIN_VERSION}" end |