Skip to content

Instantly share code, notes, and snippets.

View sds's full-sized avatar

Shane da Silva sds

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sds on github.
  • I am sds (https://keybase.io/sds) on keybase.
  • I have a public key ASD1ixXI9fZbXPdcUk3s3p0cT7ObQy4vIExEvakleGqLxgo

To claim this, I am signing this object:

@sds
sds / kitchen_docker.rb
Created March 16, 2015 19:38
Override rm_container to properly shutdown containers
require 'kitchen/driver/docker'
module Kitchen
module Driver
class Docker < Kitchen::Driver::SSHBase
...
def rm_container(state)
container_id = state[:container_id]
@sds
sds / kitchen_docker.rb
Last active August 29, 2015 14:17
Override login_command for kitchen-docker driver
require 'kitchen/driver/docker'
module Kitchen
module Driver
class Docker < Kitchen::Driver::SSHBase
def login_command(state)
LoginCommand.new(%W[
docker exec -it #{state[:container_id]} bash
])
end
@sds
sds / Dockerfile
Created March 16, 2015 19:32
Dockerfile suitable for testing cookbooks on CentOS 7
# Defines Docker image suitable for testing cookbooks on CentOS 7.
#
# This handles a number of idiosyncrasies with systemd so it can be
# run as the root process of the container, making it behave like a
# normal VM but without the overhead.
FROM centos:centos7
# Systemd needs to be able to access cgroups
VOLUME /sys/fs/cgroup