Inspired by rbjarnason/docker-ngircd. Thanks.
What the others do that this one does not:
What this one does different:
Why I reinvented the wheel:
In short, I have partially reinvented the wheel by writing yet another NGIRCD docker implementation. Even worse, it does even less than the others. You should probably use theirs. I built this for my own purposes: To do less by default and work better with puppet. I wanted to ship my own config file easier and I wanted to expose my own ports since I use non-standard ones.
What I will be doing (H/T girish, densuke, rbjarnason) is using supervisord to manage the IRCd.
Here is how I'm deploying it:
Prerequisites for this deployment:
Here is the class/profile I am using to set up a docker image, a /ngircd directory for storing data, and create/stash self-signed certificates. To apply it, you can include the class in the manifest or using the hiera_include('classes') method.
class profiles::irc {
include docker
$irc_image = 'bbriggs/ngircd'
$certdir = '/ngircd'
docker::image { $irc_image: }
file {'/var/log/ngircd.log':
ensure => 'present',
}
->
file {'/ngircd':
ensure => 'directory',
}
->
exec {'create_self_signed_sslcert':
command => "openssl req -newkey rsa:2048 -nodes -keyout ${::fqdn}.key -x509 -days 365 -out ${::fqdn}.crt -subj '/CN=${::fqdn}'",
cwd => $certdir,
creates => [ "${certdir}/${::fqdn}.key", "${certdir}/${::fqdn}.crt", ],
path => ["/usr/bin", "/usr/sbin"],
}
->
file {'/ngircd/ngircd.conf':
ensure => 'present',
content => template('profiles/ngircd.conf.erb')
}
~>
docker::run {'ngircd':
image => $irc_image,
ports => ['6697:6697'],
use_name => true,
restart_service => true,
volumes => ['/ngircd/ngircd.conf:/etc/ngircd/ngircd.conf','/var/log/ngircd.log:/var/log/supervisord/ngircd.log',"${certdir}:/ngircd"],
}
}
Content type
Image
Digest
sha256:cac41cd06…
Size
96.6 MB
Last updated
about 11 years ago
docker pull bbriggs/ngircd