Sha256: 0cac1cde72b554f3bdc6774233541bb7ea0afcd78cbe3ad72bcb47c812687344

Contents?: true

Size: 592 Bytes

Versions: 3

Compression:

Stored size: 592 Bytes

Contents

class Kamal::Commands::Docker < Kamal::Commands::Base
  # Install Docker using the https://github.com/docker/docker-install convenience script.
  def install
    pipe [ :curl, "-fsSL", "https://get.docker.com" ], :sh
  end

  # Checks the Docker client version. Fails if Docker is not installed.
  def installed?
    docker "-v"
  end

  # Checks the Docker server version. Fails if Docker is not running.
  def running?
    docker :version
  end

  # Do we have superuser access to install Docker and start system services?
  def superuser?
    [ '[ "${EUID:-$(id -u)}" -eq 0 ]' ]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kamal-1.0.0 lib/kamal/commands/docker.rb
kamal-0.16.1 lib/kamal/commands/docker.rb
kamal-0.16.0 lib/kamal/commands/docker.rb