Sha256: f2cc09a363bd8a0e07ab0940c18d9fa8b77871868215ce388948cda01b361111

Contents?: true

Size: 519 Bytes

Versions: 43

Compression:

Stored size: 519 Bytes

Contents

class Kamal::Configuration::Volume
  attr_reader :host_path, :container_path
  delegate :argumentize, to: Kamal::Utils

  def initialize(host_path:, container_path:)
    @host_path = host_path
    @container_path = container_path
  end

  def docker_args
    argumentize "--volume", "#{host_path_for_docker_volume}:#{container_path}"
  end

  private
    def host_path_for_docker_volume
      if Pathname.new(host_path).absolute?
        host_path
      else
        File.join "$(pwd)", host_path
      end
    end
end

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
kamal-2.5.3 lib/kamal/configuration/volume.rb
kamal-2.5.2 lib/kamal/configuration/volume.rb
kamal-2.5.1 lib/kamal/configuration/volume.rb
kamal-2.5.0 lib/kamal/configuration/volume.rb
kamal-2.4.0 lib/kamal/configuration/volume.rb
nocoffee-kamal-2.3.0.3 lib/kamal/configuration/volume.rb
nocoffee-kamal-2.3.0.2 lib/kamal/configuration/volume.rb
nocoffee-kamal-2.3.0.1 lib/kamal/configuration/volume.rb
kamal-2.3.0 lib/kamal/configuration/volume.rb
kamal-2.2.2 lib/kamal/configuration/volume.rb
kamal-2.2.1 lib/kamal/configuration/volume.rb
kamal-2.2.0 lib/kamal/configuration/volume.rb
kamal-1.9.2 lib/kamal/configuration/volume.rb
kamal-2.1.2 lib/kamal/configuration/volume.rb
kamal-2.1.1 lib/kamal/configuration/volume.rb
kamal-2.1.0 lib/kamal/configuration/volume.rb
kamal-1.9.1 lib/kamal/configuration/volume.rb
kamal-2.0.0 lib/kamal/configuration/volume.rb
kamal-1.9.0 lib/kamal/configuration/volume.rb
kamal-2.0.0.rc4 lib/kamal/configuration/volume.rb