Sha256: e631410255c9eae78e515a7986bd0876561cf92d919a01175bf8664838a2d4f9
Contents?: true
Size: 892 Bytes
Versions: 22
Compression:
Stored size: 892 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 def create_network docker :network, :create, :kamal 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
22 entries across 22 versions & 2 rubygems