Class: Mrsk::Commands::Traefik

Inherits:
Base
  • Object
show all
Defined in:
lib/mrsk/commands/traefik.rb

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Mrsk::Commands::Base

Instance Method Details

#infoObject



22
23
24
# File 'lib/mrsk/commands/traefik.rb', line 22

def info
  docker :ps, "--filter", "name=traefik"
end

#logsObject



26
27
28
# File 'lib/mrsk/commands/traefik.rb', line 26

def logs
  docker :logs, "traefik", "-n", "100", "-t"
end

#remove_containerObject



30
31
32
# File 'lib/mrsk/commands/traefik.rb', line 30

def remove_container
  docker :container, :prune, "-f", "--filter", "label=org.opencontainers.image.title=Traefik"
end

#remove_imageObject



34
35
36
# File 'lib/mrsk/commands/traefik.rb', line 34

def remove_image
  docker :image, :prune, "-a", "-f", "--filter", "label=org.opencontainers.image.title=Traefik"
end

#runObject



4
5
6
7
8
9
10
11
12
# File 'lib/mrsk/commands/traefik.rb', line 4

def run
  docker :run, "--name traefik",
    "-d",
    "--restart unless-stopped",
    "-p 80:80",
    "-v /var/run/docker.sock:/var/run/docker.sock",
    "traefik",
    "--providers.docker"
end

#startObject



14
15
16
# File 'lib/mrsk/commands/traefik.rb', line 14

def start
  docker :container, :start, "traefik"
end

#stopObject



18
19
20
# File 'lib/mrsk/commands/traefik.rb', line 18

def stop
  docker :container, :stop, "traefik"
end