lib/dockerun/command/run.rb in dockerun-0.3.5 vs lib/dockerun/command/run.rb in dockerun-0.3.6

- old
+ new

@@ -150,10 +150,11 @@ config.add_image(imageName) contNames = config.container_names(imageName) selContName = nil + port_mapping = {} if contNames.length == 0 selContName = nil elsif contNames.length == 1 selContName = contNames.first else @@ -171,11 +172,11 @@ else selContName = sel end end - selContName = run_docker_container(imageName, selContName, mount_points) do |ops, *args| + selContName, otherConfigs = run_docker_container(imageName, selContName, mount_points) do |ops, *args| case ops when :new_container_name cli.ask("\n Please provide a new container name : ".yellow, required: true) when :container_name_exist cli.yes?(" ** Container name '#{args.first}' already exist. Proceed with existing?".red) @@ -207,9 +208,13 @@ # cli.yes?("Add more volume mapping?") end end config.add_container(imageName, selContName) + + config.add_mount_to_container(imagename, selContName, mount_points) + + config.add_port_mapping_to_container(imagename, selContName, @otherConfigs[:port_mapping]) if not_empty?(@otherConfigs[:port_mapping]) config.to_storage end end