Sha256: 56305b7622fb61bba6ac7d99f9a5ed458d09bea412ff964da0a8610d9274a469
Contents?: true
Size: 827 Bytes
Versions: 16
Compression:
Stored size: 827 Bytes
Contents
class Kamal::Commands::Docker < Kamal::Commands::Base # Install Docker using the https://github.com/docker/docker-install convenience script. def install pipe get_docker, :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 ] || command -v sudo >/dev/null || command -v su >/dev/null' ] end private def get_docker shell \ any \ [ :curl, "-fsSL", "https://get.docker.com" ], [ :wget, "-O -", "https://get.docker.com" ], [ :echo, "\"exit 1\"" ] end end
Version data entries
16 entries across 16 versions & 1 rubygems