Sha256: b1c6f09a72f11c8a5f090c6f67b795ff653e7a2a9f7e3c75e97a0bc2082c469b
Contents?: true
Size: 1.68 KB
Versions: 5
Compression:
Stored size: 1.68 KB
Contents
#!/usr/bin/env ruby require 'securerandom' require 'colorize' require_relative '../lib/docker/cli' require_relative '../lib/docker/cli/operations/args_parser' include TR::CondUtils include Docker::Cli begin STDOUT.puts "\n Docker Cli version #{Docker::Cli::VERSION}".green ArgsParser.new.parse_argv(ARGV) rescue TTY::Reader::InputInterrupt rescue ArgsParser::ArgsParserException => ex STDERR.puts ex.message.red #STDERR.puts ex.backtrace.join("\n") end #if ARGV.length > 0 # # # # Should spin off jruby:9.4.2.0-jdk and land on console # # > gemdocker jruby:9.4.2.0-jdk # # # dimage = ARGV.first # cmd = ARGV[1] || "/bin/bash" # # contName = SecureRandom.hex(8) # # mountLocal = Dir.getwd # mountDocker = "/opt/#{File.basename(Dir.getwd)}" # # user & group created but cannot switch to the user # # User creation and login cannot be on the same session # #Docker::Cli::DockerContainer.prep_container(dimage, mount_local: mountLocal, mount_docker: mountDocker, container_name: contName, mount: { mountLocal => mountDocker }) # # #cont = Docker::Cli::DockerContainer.new(contName) # #cont.start if not cont.is_running? # #cont.run_command(cmd, interactive: true, tty: true) # #Docker::Cli::DockerContainer.create_container(dimage, interactive: true, tty: true, command: cmd, container_name: contName, mount: { mountLocal => mountDocker }, match_user: true) # # # This approach has user match with local user but no name on the docker # # workable not nice only # Docker::Cli::DockerContainer.create_container(dimage, interactive: true, tty: true, command: cmd, mount: { mountLocal => mountDocker }, match_user: true) # #else # # interactive # puts "Interactive coming soon..." #end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
docker-cli-0.5.4 | exe/gemdocker |
docker-cli-0.5.3 | exe/gemdocker |
docker-cli-0.5.2 | exe/gemdocker |
docker-cli-0.5.1 | exe/gemdocker |
docker-cli-0.5.0 | exe/gemdocker |