dockerfile.git
7 years agothumbor: Update to post v6.0 master
W. Trevor King [Sat, 13 Aug 2016 00:53:13 +0000 (17:53 -0700)]
thumbor: Update to post v6.0

Catch package.accept_keywords up with dependency changes from the
current Gentoo tree and my recently-bumped dev-python/thumbor package.

Install the wtk overlay with some Layman hoop-jumping, since my
overlay has recently been bumped from the official list on account of
old EAPIs and such [1].  I'll work on getting it back up to speed, but
that's not going to happen today ;).

Also fix the location in the README tree (it should be under
gentoo-layman).

[1]: https://bugs.gentoo.org/show_bug.cgi?id=557812

7 years agogentoo-layman/Dockerfile.template: Update for modern layman
W. Trevor King [Fri, 12 Aug 2016 16:04:57 +0000 (09:04 -0700)]
gentoo-layman/Dockerfile.template: Update for modern layman

From [1]:

  This method uses the new portage plugins system.  Layman will create
  its configuration file in /etc/portage/repos.conf/ directory.  There
  is no need for PORTDIR_OVERLAY changes in /etc/portage/make.conf.

  Configure layman to use repos.conf method in /etc/layman/layman.cfg.
  New installations of layman will probably have this already set
  correctly:

  ...

  If you have >=layman-2.3.0 installed, you can force a rebuild of
  layman's repos.conf files:

    root # layman-updater -R

although I've gone with the long option --rebuild for clarity in this
commit.

Update the fetch command because:

  $ layman --version
  2.4.1
  $ layman --help | grep -A2 -- --fetch
    -f, --fetch   Fetch a remote list of overlays. This option is
                  deprecated. The fetch operation will be performed by
                  default when you run sync, sync-all, or list.

[1]: https://wiki.gentoo.org/wiki/Layman#repos.conf_method_.28default.29

7 years agobuild.sh: Bump DATE to 20160804
W. Trevor King [Thu, 11 Aug 2016 20:14:11 +0000 (13:14 -0700)]
build.sh: Bump DATE to 20160804

Get a Tornado >4.1.0 for working SNI in Thumbor [1,2,3,4].

[1]: https://tools.ietf.org/html/rfc6066#section-3
[2]: https://github.com/thumbor/thumbor/issues/409
[3]: https://github.com/tornadoweb/tornado/pull/1270
[4]: https://github.com/tornadoweb/tornado/commit/ab706d692e83d146b2b8ecfc502414bc49cbdd01

9 years ago*/Dockerfile.template: mkdir -p /etc/portage/package.use
W. Trevor King [Thu, 9 Apr 2015 04:26:44 +0000 (21:26 -0700)]
*/Dockerfile.template: mkdir -p /etc/portage/package.use

With the stage3 from 20150402 the directory already exists:

  # cat /etc/portage/package.use/iputils
  net-misc/iputils -caps -filecaps

I don't know how reliable that's going to be though, so I'm not
dropping the mkdir call entirely.

Dockerfile.templates that used to write to an /etc/portage/package.use
file now write to a package-specific file inside the package.use
directory (which is better practice anyway).

9 years agobuild.sh: Bump DATE to 20150402
W. Trevor King [Thu, 9 Apr 2015 02:47:29 +0000 (19:47 -0700)]
build.sh: Bump DATE to 20150402

No reason, just staying current.

9 years agograb.sh: Adjust sed expression to also remove sizes from latest lines
W. Trevor King [Thu, 9 Apr 2015 02:45:51 +0000 (19:45 -0700)]
grab.sh: Adjust sed expression to also remove sizes from latest lines

Recently the latest file gained a second byte-size column, with
entries like:

  20150402/stage3-amd64-20150402.tar.bz2 215954519

This commit relaxes the sed expression to match these new lines too.

9 years agobuild.sh: Bump DATE to 20141204
W. Trevor King [Sun, 7 Dec 2014 22:20:53 +0000 (14:20 -0800)]
build.sh: Bump DATE to 20141204

No reason, just staying current.

9 years agobuild.sh: Use 'id -u -n' instead of 'whoami' for POSIX compatibility
W. Trevor King [Sat, 29 Nov 2014 16:57:09 +0000 (08:57 -0800)]
build.sh: Use 'id -u -n' instead of 'whoami' for POSIX compatibility

'whoami' isn't in the POSIX spec, but 'id -u -n' is in POSIX and does
the same thing [2].

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/id.html#tag_20_59_18

9 years agobuild.sh: Use Naohiro's $(whoami) default namespace
W. Trevor King [Sat, 29 Nov 2014 16:48:13 +0000 (08:48 -0800)]
build.sh: Use Naohiro's $(whoami) default namespace

This way folks who aren't me don't need to explicitly set NAMESPACE.
Naohiro added the line in bdb9c6cb (Initial import, 2014-06-27, [1])
and then clarified the licensing in 8f90d189 (Add copyright notice:
issue #4, [2]).

Based-on-patch-by: Naohiro Aota <naota@gentoo.org>
[1]: https://github.com/naota/dockergentoo/commit/bdb9c6cbdaa8b3dc1579c6c4fd1ae5cd89db83cc
[2]: https://github.com/naota/dockergentoo/commit/8f90d189b7f4175f3447aa7f82b82799944f07c1

9 years agosalt/Dockerfile.template: After selecting Python 2, make it the default
W. Trevor King [Sat, 15 Nov 2014 05:20:10 +0000 (21:20 -0800)]
salt/Dockerfile.template: After selecting Python 2, make it the default

No sense in having 'python' point at Python 3 if could get depcleaned
later.

9 years agosalt-master: Add a Salt master image
W. Trevor King [Fri, 14 Nov 2014 21:15:57 +0000 (13:15 -0800)]
salt-master: Add a Salt master image

You could use nsenter [1] instead of 'docker exec', but we should
point folks at the builtin approach.

[1]: https://github.com/jpetazzo/nsenter

9 years agosalt-minion/README.md: Update links
W. Trevor King [Fri, 14 Nov 2014 21:09:01 +0000 (13:09 -0800)]
salt-minion/README.md: Update links

9 years agosalt: Add a generic Salt image to be shared between minion and master images
W. Trevor King [Fri, 14 Nov 2014 20:02:15 +0000 (12:02 -0800)]
salt: Add a generic Salt image to be shared between minion and master images

The master image is coming with the next commit.

9 years agonagios: Disable the SSH checks on localhost
W. Trevor King [Wed, 12 Nov 2014 23:39:01 +0000 (15:39 -0800)]
nagios: Disable the SSH checks on localhost

The Nagios Docker container won't have SSH access enabled.

The irregularity in tabs vs. spaces occurs upstream.

9 years agopackage-cache/README.md: Drop jq dependency
W. Trevor King [Thu, 6 Nov 2014 20:48:50 +0000 (12:48 -0800)]
package-cache/README.md: Drop jq dependency

Use Docker's built-in Go templating instead.

9 years agonagios: Add a Nagios image for service monitoring
W. Trevor King [Wed, 29 Oct 2014 20:36:40 +0000 (13:36 -0700)]
nagios: Add a Nagios image for service monitoring

The lighttpd config snippet is based on Gentoo's
lighttpd_nagios3-r1.conf from net-analyzer/nagios-core.  I've dropped
the auth snippets (you can put your auth in a reverse-proxy in front
of the nagios container) and added a redirect from / to /nagios.

I had to add mod_fastcgi.conf to avoid:

  NOT handling file as static file, extension forbidden

for *.php files.

I set timezones to avoid the following PHP warning:

  date(): It is not safe to rely on the system's timezone
  settings. You are *required* to use the date.timezone setting or the
  date_default_timezone_set() function. In case you used any of those
  methods and you are still getting this warning, you most likely
  misspelled the timezone identifier

9 years agopackage-cache/Dockerfile.template: Use package.accept_keywords/package-cache
W. Trevor King [Wed, 29 Oct 2014 18:36:24 +0000 (11:36 -0700)]
package-cache/Dockerfile.template: Use package.accept_keywords/package-cache

Avoid:

  Step 3 : RUN echo '=net-proxy/package-cache-9999 ~amd64' >> /etc/portage/package.accept_keywords
   ---> Running in f36c7b3c1a27
  /bin/sh: /etc/portage/package.accept_keywords: Is a directory
  2014/10/29 11:23:21 The command [/bin/sh -c echo '=net-proxy/package-cache-9999 ~amd64' >> /etc/portage/package.accept_keywords] returned a non-zero code: 1
  failed to build package-cache

Since d8ed6289 (gentoo-layman/Dockerfile.template: Work around the
lack of Python 2, 2014-08-30), gentoo-layman is creating directories
for /etc/portage/package.accept_keywords and /etc/portage/package.use.

9 years agobuild.sh: Bump DATE to 20141023
W. Trevor King [Wed, 29 Oct 2014 16:29:21 +0000 (09:29 -0700)]
build.sh: Bump DATE to 20141023

No reason, just staying current.

9 years agothumbor: Add a Thumbor image (Docker) for manipulating images (pictures)
W. Trevor King [Wed, 29 Oct 2014 04:49:26 +0000 (21:49 -0700)]
thumbor: Add a Thumbor image (Docker) for manipulating images (pictures)

Open-source, smart, on-demand image cropping, resizing and filters.

9 years agonginx/Dockerfile.template: Add auth_request to NGINX_MODULES_HTTP
W. Trevor King [Thu, 23 Oct 2014 21:49:05 +0000 (14:49 -0700)]
nginx/Dockerfile.template: Add auth_request to NGINX_MODULES_HTTP

This module is simple and flexible [1].  I'm pushing it for the new
docker-registry auth, so I'm going to install it by default in my
Nginx image.

[1]: http://nginx.org/en/docs/http/ngx_http_auth_request_module.html

9 years agogentoo-layman/Dockerfile.template: Disable check_official
W. Trevor King [Wed, 22 Oct 2014 19:50:05 +0000 (12:50 -0700)]
gentoo-layman/Dockerfile.template: Disable check_official

I'm going to write up a patch so that you can override this from
Layman's command line, but until that patch lands in an upstream
release we'll need to tweak the config to support non-interactive
overlay additions.

9 years agobuild.sh: Bump DATE to 20141002
W. Trevor King [Wed, 8 Oct 2014 18:19:56 +0000 (11:19 -0700)]
build.sh: Bump DATE to 20141002

No reason, just staying current.

9 years agodocker-registry/Dockerfile.template: Drop Layman from the stack
W. Trevor King [Fri, 12 Sep 2014 19:14:06 +0000 (12:14 -0700)]
docker-registry/Dockerfile.template: Drop Layman from the stack

I needed Layman in afa78a6e (docker-registry/Dockerfile.template: Add
flask-cors dependency, 2014-08-30), because my flask-cors ebuild
wasn't in the main Portage tree yet.  With 01d1a28f (build.sh: Bump
DATE to 20140911, 2014-09-12), we're pulling in a Portage tree that
does have my flask-cors package, so we no longer need the Layman stuff
here.

9 years agobuild.sh: Bump DATE to 20140911
W. Trevor King [Fri, 12 Sep 2014 19:07:51 +0000 (12:07 -0700)]
build.sh: Bump DATE to 20140911

This pulls in my proxy-maintained flask-cors [1,2].

[1]: https://bugs.gentoo.org/show_bug.cgi?id=517478
     Summary: dev-python/flask-cors - A Flask extension adding a
       decorator for CORS support
     Ian Delaney (idella4) added my ebuild to the Portage tree [2].
[2]: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-python/flask-cors/
     Summary: ebuild written by W. T. King, from his overlay
     Date: 2014-09-09 02:56:48Z

9 years ago*/Dockerfile.template: Replace ADD with COPY
W. Trevor King [Thu, 11 Sep 2014 23:35:29 +0000 (16:35 -0700)]
*/Dockerfile.template: Replace ADD with COPY

The COPY command landed in Docker v0.12.0 as a less-magical version of
ADD [1].  The Docker folks have been replacing assorted ADD occurences
with COPY since then [2,3,4].  The only caveat is that it won't work
on older versions of Docker, but I agree with a bunch of folks that
that's something best dealt with by upgrading your Docker version [5].

[1]: https://github.com/docker/docker/pull/6089
[2]: https://github.com/docker/docker/issues/6912
[3]: https://github.com/docker/docker/pull/6941
[4]: https://github.com/docker/docker/pull/6942
[5]: https://github.com/docker/docker/pull/7471

9 years agobuild.sh: Bump DATE to 20140904
W. Trevor King [Fri, 5 Sep 2014 17:50:08 +0000 (10:50 -0700)]
build.sh: Bump DATE to 20140904

This pulls in a fix for Layman on Python 3 [1,2].

[1]: https://bugs.gentoo.org/show_bug.cgi?id=521724
     Summary: app-portage/layman-2.1.0-r2 - ImportError: cannot import
       name 'MakeConf'
     Devan Franchini (twitch153) cut layman-2.1.0-r3 with a fix [2].
[2]: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-portage/layman/layman-2.1.0-r3.ebuild?revision=1.1&view=markup
     Summary: Adds patch to fix improper import for ConfigHandler, bug #521724
     Date: 2014-09-02 22:06:59Z

9 years agodocker-registry/Dockerfile.template: Add flask-cors dependency
W. Trevor King [Sat, 30 Aug 2014 16:46:20 +0000 (09:46 -0700)]
docker-registry/Dockerfile.template: Add flask-cors dependency

This landed in docker-registry's be21b160 (Fix issue #333 - Added CORS
support to 'get images' and 'search' methods in registry REST api,
2014-05-01), which landed in 0.6.9 (2014-05-08).  I need to use Layman
and my overlay until the flask-cors ebuild lands in the main Portage
tree [1].

[1]: https://bugs.gentoo.org/show_bug.cgi?id=517478

9 years agoMerge branch 'python'
W. Trevor King [Sun, 31 Aug 2014 07:36:29 +0000 (00:36 -0700)]
Merge branch 'python'

* python:
  gentoo-layman/Dockerfile.template: Work around the lack of Python 2
  docker-registry/Dockerfile.template: Adjust Python 2 dependency
  buildbot/Dockerfile.template: Adjust Python 2 dependency
  gentoo-python: Remove Python 2

9 years agogentoo-layman/Dockerfile.template: Work around the lack of Python 2
W. Trevor King [Sun, 31 Aug 2014 06:12:05 +0000 (23:12 -0700)]
gentoo-layman/Dockerfile.template: Work around the lack of Python 2

The existing stable version of Layman needs Python 2, but the ~amd64
version is compatible with Python 3:

  $ cd /usr/portage/app-portage/layman
  $ grep 'PYTHON_COMPAT\|KEYWORDS' *ebuild
  layman-2.0.0-r1.ebuild:PYTHON_COMPAT=( python{2_6,2_7} pypy2_0 )
  layman-2.0.0-r1.ebuild:KEYWORDS="... amd64 ..."
  layman-2.0.0-r3.ebuild:PYTHON_COMPAT=( python{2_6,2_7} pypy pypy2_0 )
  layman-2.0.0-r3.ebuild:KEYWORDS="... amd64 ..."
  layman-2.1.0-r2.ebuild:PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
  layman-2.1.0-r2.ebuild:KEYWORDS="... ~amd64 ..."
  layman-9999.ebuild:PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
  layman-9999.ebuild:KEYWORDS=""

Layman also needs Git, and with the 'python' USE flag enabled, Git
needs Python 2:

  $ cd /usr/portage/dev-vcs/git
  $ grep PYTHON_COMPAT *ebuild
  git-1.8.3.2-r1.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-1.8.4.5.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-1.8.5.5.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-1.9.3.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-2.0.1.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-2.0.2.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-2.0.4.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-9999-r1.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-9999-r2.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-9999-r3.ebuild:PYTHON_COMPAT=( python2_{6,7} )
  git-9999.ebuild:PYTHON_COMPAT=( python2_{6,7} )

The only interesting Git features enabled by the 'python' USE flag are
the Bazaar and Mercurial remote helpers, and even they were removed in
Git 2.0.0 [1,2].

[1]: https://git.kernel.org/cgit/git/git.git/commit/?id=b2c851a8e67da752d8a5dbde5a9dae6e3428a4c9
[2]: https://git.kernel.org/cgit/git/git.git/commit/?id=896ba14d653c43bd7a43b6b291e941ab60855c04

9 years agodocker-registry/Dockerfile.template: Adjust Python 2 dependency
W. Trevor King [Fri, 22 Aug 2014 10:47:51 +0000 (03:47 -0700)]
docker-registry/Dockerfile.template: Adjust Python 2 dependency

Now that the ancestor gentoo-python image is removing Python 2, we
need to get it back for docker-registry.  We need to keep the
USE_PYTHON setting (with a tweaked value) because Gunicorn and
Python-RSA haven't transitioned to the *-r1 Python eclasses yet:

  docker run --rm wking/docker-registry /bin/bash -c 'grep inherit /var/db/pkg/  */*/*ebuild' | grep distutils | grep -v -- '-r1'
  /var/db/pkg/dev-python/rsa-3.1.1/rsa-3.1.1.ebuild:inherit distutils
  /var/db/pkg/www-servers/gunicorn-0.17.4/gunicorn-0.17.4.ebuild:inherit distutils eutils

9 years agogentoo-en-us/Dockerfile.template: Set LINGUAS to 'en' or 'en_US'
W. Trevor King [Fri, 29 Aug 2014 03:59:29 +0000 (20:59 -0700)]
gentoo-en-us/Dockerfile.template: Set LINGUAS to 'en' or 'en_US'

Only install US-English translations for gettext consumers [1,2].

[1]: http://wiki.gentoo.org/wiki/Localization/HOWTO#LINGUAS
[2]: file:///usr/portage/profiles/desc/linguas.desc

9 years agobuildbot/Dockerfile.template: Adjust Python 2 dependency
W. Trevor King [Thu, 31 Jul 2014 21:51:51 +0000 (14:51 -0700)]
buildbot/Dockerfile.template: Adjust Python 2 dependency

Now that the ancestor gentoo-python image is removing Python 2, we
need to get it back for Buildbot [1,2].  We need to keep the
USE_PYTHON setting (with a tweaked value) because buildbot hasn't
transitioned to the *-r1 Python eclasses yet:

  $ grep 'inherit.*distutils' /usr/portage/dev-util/buildbot*/*ebuild
  /usr/portage/dev-util/buildbot-slave/buildbot-slave-0.8.7_p1.ebuild:inherit distutils readme.gentoo user
  /usr/portage/dev-util/buildbot-slave/buildbot-slave-0.8.8-r1.ebuild:inherit distutils readme.gentoo systemd user
  /usr/portage/dev-util/buildbot-slave/buildbot-slave-0.8.8.ebuild:inherit distutils readme.gentoo user
  /usr/portage/dev-util/buildbot-slave/buildbot-slave-0.8.9.ebuild:inherit distutils readme.gentoo systemd user
  /usr/portage/dev-util/buildbot-slave/buildbot-slave-9999.ebuild:inherit distutils readme.gentoo user
  /usr/portage/dev-util/buildbot/buildbot-0.8.7_p1-r1.ebuild:inherit distutils readme.gentoo user
  /usr/portage/dev-util/buildbot/buildbot-0.8.8-r2.ebuild:inherit distutils readme.gentoo systemd user
  /usr/portage/dev-util/buildbot/buildbot-0.8.9.ebuild:inherit distutils readme.gentoo systemd user
  /usr/portage/dev-util/buildbot/buildbot-9999.ebuild:inherit distutils readme.gentoo user systemd

Also, instead of hardcoding the packages effected by the sqlite USE
flag change, just use --newuse on @system and @world and let Portage
figure out what needs to be rebuilt.

[1]: Buildbot will transition after Twisted
     (http://trac.buildbot.net/wiki/CompatibilityPolicy#Python3)
[2]: Twisted is 60% of the way there (94/157 Python 3 tickets,
     https://twistedmatrix.com/trac/milestone/Python-3.x)

9 years agogentoo-python: Remove Python 2
W. Trevor King [Thu, 31 Jul 2014 21:31:16 +0000 (14:31 -0700)]
gentoo-python: Remove Python 2

Portage runs fine on Python 3, and there's no need to have multiple
versions of Python installed.  Removing it here allows us to trim down
to smaller images, because Python's pretty heavy:

  $ docker run -i -t --rm wking/gentoo-portage:20140717 /bin/bash
  d1cdbe4c737a / # du -hs /usr/lib64/python2.7/
  66M     /usr/lib64/python2.7/

My current trimmed ngircd is only image is 341 MB:

  $ docker images wking/ngircd-trimmed | grep 20140717
  wking/ngircd-trimmed   20140717   98daec1a09c5   16 hours ago   340.9 MB

so about 20% of the trimmed image is a useless old Python version.  We
could shrink the trimmed image even more by removing Portage and
Python 3, but that requires some external-to-Portage hackery.  This is
easy to do, and folks who *do* need Python 2 can easily adjust their
PYTHON_TARGETS, PYTHON_SINGLE_TARGET, eselected Python, and re-emerge.

We only need to emerge @system, because @world is still empty at this
point.

9 years agobuild.sh: Bump DATE to 20140821
W. Trevor King [Fri, 22 Aug 2014 11:56:09 +0000 (04:56 -0700)]
build.sh: Bump DATE to 20140821

9 years agonginx/README.md: Fix 'neet' -> 'need' typo
W. Trevor King [Thu, 7 Aug 2014 19:46:44 +0000 (12:46 -0700)]
nginx/README.md: Fix 'neet' -> 'need' typo

9 years agobuild.sh: Mention troublesome repo in die() messages
W. Trevor King [Thu, 7 Aug 2014 19:27:55 +0000 (12:27 -0700)]
build.sh: Mention troublesome repo in die() messages

So folks don't have to scroll back up and find the "build repo
${REPO}" message or similar.

Also wrap long lines after the '||' to try and stay in the vicinity of
80 characters ;).

The inspiration came from Erik's gentoo-bb commit [1].

[1]: https://github.com/edannenberg/gentoo-bb/blob/e653d78fdb17f218aec83b5b0e11c5bf2aa07253/build.sh#L246

Based-on-patch-by: Erik Dannenberg <erik.dannenberg@bbe-consulting.de>
9 years agogentoo-openrc/Dockerfile.template: Fix FROM gentoo-portage -> gentoo-en-us
W. Trevor King [Fri, 1 Aug 2014 04:18:22 +0000 (21:18 -0700)]
gentoo-openrc/Dockerfile.template: Fix FROM gentoo-portage -> gentoo-en-us

To match the dependency graph from the README.  This should have
happened when the OpenRC template landed in 4c5d9aaf (gentoo-openrc:
Break out OpenRC configuration into a separate Dockerfile,
2014-07-18).

9 years agobuild.sh: Bump DATE to 20140724
W. Trevor King [Thu, 31 Jul 2014 22:10:51 +0000 (15:10 -0700)]
build.sh: Bump DATE to 20140724

9 years agodocker-registry/Dockerfile.template: Launch with 'exec docker-registry'
W. Trevor King [Fri, 18 Jul 2014 20:46:05 +0000 (13:46 -0700)]
docker-registry/Dockerfile.template: Launch with 'exec docker-registry'

And modernize the installation and execution:

* Remove setup-configs.sh call, because the script is gone since
  2ee1387a (Clean up configuration management, 2014-05-08).

* Use the setup.py-installed docker-registry endpoint, because run.sh
  is gone since bf3360a2 (replacing run.sh with a "docker-registry"
  console script, 2014-04-02).  Unfortunately, I can't find a way to
  run docker-registry from the source directory (without installing
  it), because Setuptools' pkg_resources seems to need some
  namespace-package *.pth funkyness.  Luckily all this is easier with
  the PEP 420 namespace implementation that landed in Python 3.3.

* Don't pass '--preload' to Gunicorn, because docker_registry.run is
  loading bulk of docker_registry before launching the Gunicorn
  process.  The stack pulling in the initial database-setup is:

    File "/.../docker_registry/run.py", line 23, in <module>
      from .search import *  # noqa
    File "/.../docker_registry/search.py", line 17, in <module>
      INDEX = index.load(cfg.search_backend.lower())
    File "/.../docker_registry/lib/index/__init__.py", line 82, in load
      return db.SQLAlchemyIndex()
    ...

  It seems inefficient to drag all this into the Gunicorn process for
  folks that don't need single-threaded setup, but whatever, it works
  for my use case ;).

9 years agoDrop 'need' -> 'use net' sedding, now that gentoo-openrc handles it
W. Trevor King [Fri, 18 Jul 2014 20:18:54 +0000 (13:18 -0700)]
Drop 'need' -> 'use net' sedding, now that gentoo-openrc handles it

With:

  rc_provide="... net"

OpenRC understands that it's not responsible for filling the net
dependency, so there's no need to tweak the scripts themselves.

9 years agodocker-registry: Trim dependencies now that some storage backends are external
W. Trevor King [Fri, 18 Jul 2014 20:00:04 +0000 (13:00 -0700)]
docker-registry: Trim dependencies now that some storage backends are external

The swift backend moved out-of-core in f700ecda (s3 / boto
support - updated drivers, tests, mock, etc etc, 2014-05-15).

The glance backend moved out-of-core in commit 2e28ad0c (Cleanup,
2014-05-15), which also removed the keystoneclient dependency.

pyopenssl (Debian's python-openssl) was never imported anywhere, and
the Dockerfile reference was removed in 365b6313 (Cleaned-up docker
file, 2014-05-19).

9 years agogentoo-openrc: Break out OpenRC configuration into a separate Dockerfile
W. Trevor King [Fri, 18 Jul 2014 18:26:29 +0000 (11:26 -0700)]
gentoo-openrc: Break out OpenRC configuration into a separate Dockerfile

Gentoo users could prefer another process manager, and we want them to
have a clean location for them to swap in their systemd (or whatever)
Dockerfile.  The net stuff is new, and with it we no longer get issues
like:

   * Bringing up network interface lo ...
  SIOCSIFADDR: Operation not permitted
  SIOCSIFFLAGS: Operation not permitted
  SIOCSIFNETMASK: Operation not permitted
  SIOCADDRT: Operation not permitted                  [ !! ]
   * ERROR: loopback failed to start

9 years agobuild.sh: Bump DATE to 20140717
W. Trevor King [Fri, 18 Jul 2014 13:18:05 +0000 (06:18 -0700)]
build.sh: Bump DATE to 20140717

Yay, a successful amd64-auto build :).

9 years agograb.sh: Try and download a matched stage3/snapshot pair
W. Trevor King [Tue, 15 Jul 2014 17:32:13 +0000 (10:32 -0700)]
grab.sh: Try and download a matched stage3/snapshot pair

Catalyst's autobuilds have been flaky recently, so it's a bit
difficult to predict when the next amd64 stage3 will land.  The
mirrors only keep a week of history, so it's easier to get the
stage3/snapshot pair from the same day if you try to grab them
automatically every evening.  This script will do that, using the
latest-stage3.txt to find the most recent stage3, and then downloading
the auxilliary files and Portage snapshot.  If the downloads all
succeed, it updates the default DATE in build.sh.

9 years agogentoo-syslog/Dockerfile.template: Tweak sources (-system +socket)
W. Trevor King [Thu, 3 Jul 2014 23:45:08 +0000 (16:45 -0700)]
gentoo-syslog/Dockerfile.template: Tweak sources (-system +socket)

Don't listen to /proc/kmsg, because Docker doesn't mount it for us.
This avoids:

   * Starting syslog-ng ...
  Error opening file for reading;
    filename='/proc/kmsg', error='Operation not permitted (1)'
  Error initializing message pipeline;
   * start-stop-daemon: failed to start `/usr/sbin/syslog-ng'
   * Failed to start syslog-ng                                        [ !! ]
   * ERROR: syslog-ng failed to start

Also add an explicit source listening to /dev/log.  I don't have this
on my host system, and that syslog-ng creates /dev/log just fine, but
my containers seem to need an explicit listing here or they don't
create /dev/log.

Reported-by: Oleg Terenchuk <litwol@litwol.com>
9 years agoportage: Shift the emphasis from a running to a non-running container
W. Trevor King [Fri, 20 Jun 2014 04:36:55 +0000 (21:36 -0700)]
portage: Shift the emphasis from a running to a non-running container

Not messing with ENTRYPOINT makes it easier to run an interactive
container with:

  $ docker run --rm -i -t wking/portage

if you want to poke around.

9 years agogentoo-portage/Dockerfile.template: Use 'webrsync --revert'
W. Trevor King [Thu, 19 Jun 2014 02:51:15 +0000 (19:51 -0700)]
gentoo-portage/Dockerfile.template: Use 'webrsync --revert'

To grab a specific snapshot of the Portage tree.  Otherwise the
snapshot you get depends on when you run webrsync.  The public mirrors
only seem to keep about a week of snapshots, so you may want to use
something like package-cache to cache interesting snapshots locally.

9 years agogentoo-portage/Dockerfile.template: Remove 'emerge --sync' call
W. Trevor King [Wed, 18 Jun 2014 19:03:52 +0000 (12:03 -0700)]
gentoo-portage/Dockerfile.template: Remove 'emerge --sync' call

specing points out that the rsync behind 'emerge --sync' is vulnerable
to man-in-the-middle attacks.  In any event, it's probably more
reproducible to stick to the daily snapshot releases used by webrsync
and ignore any changes that have since landed in the rsync mirrors.

9 years agohubot/add-github-webhooks.sh: Add an script for creating GitHub webhooks
W. Trevor King [Wed, 21 May 2014 20:10:13 +0000 (13:10 -0700)]
hubot/add-github-webhooks.sh: Add an script for creating GitHub webhooks

For notifying the github-commits and github-pull-request-notifier
scripts.  Adding these hooks to a number of repositories by hand is
tedious, and it's so easy to automate ;).

9 years agohubot/Dockerfile.template: Change 'REDISCLOUD_URL' -> 'REDIS_URL'
W. Trevor King [Wed, 30 Apr 2014 18:32:11 +0000 (11:32 -0700)]
hubot/Dockerfile.template: Change 'REDISCLOUD_URL' -> 'REDIS_URL'

hubot-scripts has supported this since 48a3b142 (Added REDIS_URL to
support dokku, 2014-03-01).  It still doesn't match Docker's
REDIS_PORT, but it's more generic than the provider-specific
REDISCLOUD_URL.

9 years agohubot: Add jenrzzz/hubot-logger
W. Trevor King [Wed, 30 Apr 2014 18:04:43 +0000 (11:04 -0700)]
hubot: Add jenrzzz/hubot-logger

This logger is not in the node index (which points to
adragomir/hubot-logger [1,2]).  However, Jenner's package has more
recent activity (one month ago, vs. five for Andrei), and seems more
featureful.  I also approve of using Redis (instead of on-disk files)
for log storage.

[1]: https://www.npmjs.org/package/hubot-logger
[2]: https://github.com/adragomir/hubot-logger

10 years agohubot/Dockerfile.template: Bump gitio to gitio2 2.0.0
W. Trevor King [Thu, 24 Apr 2014 02:47:58 +0000 (19:47 -0700)]
hubot/Dockerfile.template: Bump gitio to gitio2 2.0.0

This catches us up with da1abbd (Make use of more updated gitio2,
2014-02-09), which landed with #1317 on 2014-02-10 [1].

[1]: https://github.com/github/hubot-scripts/pull/1317

10 years agodocker-registry/package.accept_keywords: Update for 20140410 tree
W. Trevor King [Wed, 16 Apr 2014 22:41:31 +0000 (15:41 -0700)]
docker-registry/package.accept_keywords: Update for 20140410 tree

Bump a number of versions, and drop the no-longer-needed
dev-python/netaddr and dev-python/prettytable keywords (which both
have stable versions for amd64 now).

10 years agodocker-registry: Enable the SQLAlchemy search backend
W. Trevor King [Wed, 16 Apr 2014 20:18:09 +0000 (13:18 -0700)]
docker-registry: Enable the SQLAlchemy search backend

Now that it has landed [1].

[1]: https://github.com/dotcloud/docker-registry/pull/247

10 years agodocker-registry/Dockerfile.template: Emerge dev-python/sqlalchemy
W. Trevor King [Wed, 16 Apr 2014 20:15:52 +0000 (13:15 -0700)]
docker-registry/Dockerfile.template: Emerge dev-python/sqlalchemy

Now that my search-index branch has landed [1].

[1]: https://github.com/dotcloud/docker-registry/pull/247

10 years agobuild.sh: DATE to 20140410
W. Trevor King [Wed, 16 Apr 2014 19:49:51 +0000 (12:49 -0700)]
build.sh: DATE to 20140410

Some of content needed by the old snapshot is no longer mirrored
(e.g. netaddr-0.7.10_p20130801.tar.gz used by dev-python/netaddr
needed for docker-registry).

10 years agosalt-minion/Dockerfile.template: Keyword dev-python/libcloud-0.14.1
W. Trevor King [Thu, 13 Mar 2014 15:26:59 +0000 (08:26 -0700)]
salt-minion/Dockerfile.template: Keyword dev-python/libcloud-0.14.1

Avoiding:

  The following keyword changes are necessary to proceed:
   (see "package.accept_keywords" in the portage(5) man page for more details)
  # required by app-admin/salt-9999
  # required by =app-admin/salt-9999 (argument)
  =dev-python/libcloud-0.14.1 ~amd64

10 years agoRevert "build.sh: Shift Kibana packages in the default REPOS list"
W. Trevor King [Thu, 13 Mar 2014 14:21:07 +0000 (07:21 -0700)]
Revert "build.sh: Shift Kibana packages in the default REPOS list"

This reverts commit 63031ef0041949c9df74145c3ea91c8a59a2b818.

'k' comes before 'm', but the Kibana images depend on the Nginx
images, so they have to come later.

10 years agoUpdate gentoo-syslog consumers to use tail-syslog
W. Trevor King [Wed, 12 Mar 2014 21:32:30 +0000 (14:32 -0700)]
Update gentoo-syslog consumers to use tail-syslog

Folks who just used the stock:

  CMD rc default && tail -F /var/log/messages

can now piggy-back on the CMD setup in the gentoo-syslog
Dockerfile.template, so I removed their CMD lines.

I updated folks that did fancier things (e.g. tweaking configs before
'rc default') to use 'exec tail-syslog' instead of 'tail -F
/var/log/messages'.

Folks that are built FROM gentoo-syslog but never used 'rc default'
should probably be FROM a more basic image, but I left them alone in
this commit.

10 years agoRun update-copyright.py
W. Trevor King [Wed, 12 Mar 2014 19:08:07 +0000 (12:08 -0700)]
Run update-copyright.py

This bumps copyright dates for stuff that I've touched in 2014.

10 years agogentoo-syslog/Dockerfile.template: Add tail-syslog (and other tweaks)
W. Trevor King [Wed, 12 Mar 2014 18:46:03 +0000 (11:46 -0700)]
gentoo-syslog/Dockerfile.template: Add tail-syslog (and other tweaks)

The main change here is a new tail-syslog script that traps SIGTERM
and shuts down running OpenRC processes (using 'rc shutdown').  This
gives us clean shutdowns for 'docker stop' and friends, which makes
'docker restart' and host reboots more reliable.

The tail-syslog script is not the most elegant solution.  In fact,
rc(8) suggests:

  There are some special runlevels that you should be aware of:
  ...
  shutdown  Changes to the shutdown runlevel and then halts the host.

  You should not call any of these runlevels yourself.  Instead you
  should use init(8) and shutdown(8) and let them call these special
  runlevels.

Indead, using 'CMD /sbin/init' seems to work fine, but I can't figure
out how to get the logs out via 'docker logs'.  I tried a number of
things, including

  RUN sed -i 's|^\([^#].*/sbin/agetty.*\)|#\1|' /etc/inittab
  RUN echo 'log1:12345:respawn:/usr/bin/tail -F /var/log/messages >/dev/console' >> /etc/inittab

but none of my attempts along those lines worked.

You could work around this by volume-mounting a host directory to the
container's /var/log, or by configuring syslog-ng to forward logs to a
remote destination with something like:

  RUN sed -i 's/^\(destination messages\).*;$/\1 { tcp("logs.example.net" port(514) };/' /etc/syslog-ng/syslog-ng.conf

But we don't have a central syslog instance to forward to, and I like
'docker logs' ;).

So that nixed the /sbin/init approach, and I started looking at signal
trapping in a shell script [1].  When I tried to use 'shutdown -h now'
in place of 'rc shutdown', I got log messages like:

  Mar 12 18:29:14 f50a7b4bd8c9 logger: trapped SIGTERM, shutting down
  Mar 12 18:29:14 f50a7b4bd8c9 shutdown[272]: shutting down for system halt
  shutdown: /dev/initctl: No such file or directory
  init: /dev/initctl: No such file or directory

because /sbin/init (which creates /dev/initctl) was not running).
Using 'rc shutdown' directly avoids that problem.

Also in this commit:
* Add an initial ^ to the console_all sed line, which just makes
  explicit the fact that I'm matching from the beginning of the line.
* Enable boot logging to /var/log/rc.log, in case someone actually
  does run /sbin/init.

[1]: 'trap' is in POSIX.1-2008 (IEEE Std 1003.1, 2013 Edition)
     http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_28

10 years agoirker/Dockerfile.template: Change branch from 'ssl-tls' to 'next'
W. Trevor King [Wed, 12 Mar 2014 17:20:59 +0000 (10:20 -0700)]
irker/Dockerfile.template: Change branch from 'ssl-tls' to 'next'

Most of the SSL/TLS patches are now upstream, so I started a new
'next' branch to incorperate my additional changes.

10 years agoirker: Add irker, a simple IRC multiplexer daemon
W. Trevor King [Sat, 8 Mar 2014 03:19:53 +0000 (19:19 -0800)]
irker: Add irker, a simple IRC multiplexer daemon

Send messages to an IRC channel from Bash (or anything else that can
send JSON over UDP or TCP).

10 years agongircd: Add support for SSL=optional
W. Trevor King [Wed, 5 Mar 2014 23:05:52 +0000 (15:05 -0800)]
ngircd: Add support for SSL=optional

If SSL.Ports is set and Global.Ports is not set, Global.Ports defaults
to empty (not 6667), and you don't get a plaintext listener [1].  With
the new 'optional' setting, explicitly declare Global.Ports so you
have both an SSL listener (on 6697) and a plaintext listener (on 6667).

[1]: http://arthur.barton.de/pipermail/ngircd-ml/2011-February/000471.html

10 years agohubot/README.md: Mention HUBOT_LOG_LEVEL
W. Trevor King [Mon, 3 Mar 2014 16:46:09 +0000 (08:46 -0800)]
hubot/README.md: Mention HUBOT_LOG_LEVEL

Strangely, this environment variable does not seem to be documented at
all:

  hubot$ git grep HUBOT_LOG_LEVEL
  src/robot.coffee:    @logger    = new Log process.env.HUBOT_LOG_LEVEL or 'info'

10 years agogentoo-node: Add a base image with Node and npm
W. Trevor King [Sun, 2 Mar 2014 23:49:24 +0000 (15:49 -0800)]
gentoo-node: Add a base image with Node and npm

I forgot to commit this before the hubot Dockerfile.  Better late than
never ;).

10 years agogentoo-utc: Setup /etc/timezone and /etc/localtime
W. Trevor King [Sun, 2 Mar 2014 20:35:24 +0000 (12:35 -0800)]
gentoo-utc: Setup /etc/timezone and /etc/localtime

Following the Gentoo x86 install guide [1].  This avoids errors like:

  [Sun Mar 02 2014 20:22:48 GMT+0000 (Local time zone must be set--see zic manual page)] ...

Which I was getting in my hubot logs.

[1]: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6#doc_chap4

10 years agohubot: Add a hubot image
W. Trevor King [Sun, 2 Mar 2014 23:13:38 +0000 (15:13 -0800)]
hubot: Add a hubot image

I had to instal Git to avoid a:

  GET https://registry.npmjs.org/scoped-http-client
   GET https://registry.npmjs.org/async
  ERR! not found: git
  npm ERR!
   ERR! Failed using git.
   This is most likely not a problem with npm itself.
   Please check if you have git installed and in your PATH.

   Linux 3.13.0
  command "/usr/bin/node" "/usr/bin/npm" "install"
  cwd /hubot
  node -v v0.10.21
   1.3.11
   ENOGIT

error during the 'npm install'.  Other than that, this is fairly
straightforward, although I wish that the script dependencies were
handled automatically :p.

Docker doesn't let you modify /etc/hosts at the moment [1].  If you
need to add custom DNS (because your target IRC server doesn't resolve
automatically), you can use dnsmasq [2].  I added something like this
to the tail of my hubot/Dockerfile.template:

  RUN emerge -v dnsmasq
  RUN rc-update add dnsmasq default
  RUN echo 'address="/irc.example.net/192.168.0.2"' >> /etc/dnsmasq.conf
  RUN echo 'nameserver 192.168.0.1' >> /etc/resolv.dnsmasq.conf
  RUN echo 'resolv-file=/etc/resolv.dnsmasq.conf' >> /etc/dnsmasq.conf
  RUN echo 'listen-address=127.0.0.1' >> /etc/dnsmasq.conf
  RUN sed -i 's/need localmount net$/use localmount net/' /etc/init.d/dnsmasq

And fired up the container with:

  docker run ... --dns 127.0.0.1 wking/hubot /bin/bash
  # rc default
  # cd hubot
  # REDISCLOUD_URL="${REDIS_PORT}" exec bin/hubot --name "${HUBOT_IRC_NICK:-hubot}" -a irc

[1]: https://github.com/dotcloud/docker/issues/2267
[2]: https://github.com/dotcloud/docker/issues/1951#issuecomment-24960347

10 years agohubot: Add a hubot image
W. Trevor King [Sun, 2 Mar 2014 20:18:51 +0000 (12:18 -0800)]
hubot: Add a hubot image

I had to instal Git to avoid a:

  GET https://registry.npmjs.org/scoped-http-client
   GET https://registry.npmjs.org/async
  ERR! not found: git
  npm ERR!
   ERR! Failed using git.
   This is most likely not a problem with npm itself.
   Please check if you have git installed and in your PATH.

   Linux 3.13.0
  command "/usr/bin/node" "/usr/bin/npm" "install"
  cwd /hubot
  node -v v0.10.21
   1.3.11
   ENOGIT

error during the 'npm install'.  Other than that, this is fairly
straightforward, although I wish that the script dependencies were
handled automatically :p.

Docker doesn't let you modify /etc/hosts at the moment [1].  If you
need to add custom DNS (because your target IRC server doesn't resolve
automatically), you can use dnsmasq [2].  I added something like this
to the tail of my hubot/Dockerfile.template:

  RUN emerge -v dnsmasq
  RUN rc-update add dnsmasq default
  RUN echo 'address="/irc.example.net/192.168.0.2"' >> /etc/dnsmasq.conf
  RUN echo 'nameserver 192.168.0.1' >> /etc/resolv.dnsmasq.conf
  RUN echo 'resolv-file=/etc/resolv.dnsmasq.conf' >> /etc/dnsmasq.conf
  RUN echo 'listen-address=127.0.0.1' >> /etc/dnsmasq.conf
  RUN sed -i 's/need localmount net$/use localmount net/' /etc/init.d/dnsmasq

And fired up the container with:

  docker run ... --dns 127.0.0.1 wking/hubot /bin/bash
  # rc default
  # cd hubot
  # REDISCLOUD_URL="${REDIS_PORT}" exec bin/hubot --name "${HUBOT_IRC_NICK:-hubot}" -a irc

[1]: https://github.com/dotcloud/docker/issues/2267
[2]: https://github.com/dotcloud/docker/issues/1951#issuecomment-24960347

10 years agongircd/README.md: Document the 20-character password limit
W. Trevor King [Sat, 1 Mar 2014 19:28:54 +0000 (11:28 -0800)]
ngircd/README.md: Document the 20-character password limit

From the referenced INSTALL docs:

  Differences to version 0.8.x

  - The maximum length of passwords has been raised to 20 characters
    (instead of 8 characters). If your passwords are longer than 8
    characters then they are cut at an other position now.

so in v0.8 and earlier the password limit was even shorter.

10 years agongircd: Add support for GLOBAL_PASSWORD
W. Trevor King [Sat, 1 Mar 2014 05:44:28 +0000 (21:44 -0800)]
ngircd: Add support for GLOBAL_PASSWORD

We need to disable PAM support at compile time to get this working,
because with PAM compiled in global password are broken until 485d0ae
(Use server password when PAM is compiled in but disabled, 2014-02-27,
[1]).  485d0ae landed after ngIRCd v21, so it will probably be in the
next release after that.  Once that lands in Gentoo's Portage tree, we
can re-enable PAM.

[1]: http://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git;a=commit;h=485d0aec813db9966922f17aae044df2d82b0b67

10 years agongircd: Add optional SSL / TLS support
W. Trevor King [Sat, 1 Mar 2014 00:45:19 +0000 (16:45 -0800)]
ngircd: Add optional SSL / TLS support

Unfortunately, irssi doesn't have a command-line flag to select
encrypted connections [1].  I'd like something like:

  $ irssi -c irc.example.net -p 6697 --ssl

Until something like that is added, you'll need to add the server to
your irssi config:

  $ cat ~/.irssi/config
  ...
  servers = (
    {
      address = "irc.example.net";
      chatnet = "example";
      port = "6697";
      use_ssl = "yes";
      ssl_verify = "yes";
      autoconnect = "yes";
    },
    ...
  );
  chatnets = {
    example = {
      type = "IRC";
      nick = "your-nick";
    };
    ...
  };
  ...

Or connect manually after firing up irssi:

  $ irssi --noconnect
  [(status)] /connect -ssl -ssl_verify nott 6697

Run `/help connect` for more information.

[1]: http://www.irssi.org/documentation/manual

10 years agongircd: Add an ngIRCd image
W. Trevor King [Fri, 28 Feb 2014 19:00:16 +0000 (11:00 -0800)]
ngircd: Add an ngIRCd image

This doesn't support SSL yet, but I'll look into that later.

10 years agox.509/Makefile-{link,server}: Allow users to override FQDNS
W. Trevor King [Fri, 28 Feb 2014 02:08:09 +0000 (18:08 -0800)]
x.509/Makefile-{link,server}: Allow users to override FQDNS

By using ?= to assign that variable only if it's not already set [1].
For Makefile-link, also append the 'nginx' entry using += [2], to
ensure it is always present.

[1]: https://www.gnu.org/software/make/manual/html_node/Setting.html
[2]: https://www.gnu.org/software/make/manual/html_node/Appending.html

10 years agosalt-minion/Dockerfile.template: Namespace /etc/portage/package.*
W. Trevor King [Thu, 27 Feb 2014 19:11:22 +0000 (11:11 -0800)]
salt-minion/Dockerfile.template: Namespace /etc/portage/package.*

Use directories instead of files.  This makes it easy for other folks
to drop in their own USE flag and keyword overrides without worring
about appending to our existing files.

10 years agosalt-minion/Dockerfile.template: Bump to Salt v2014.1.0
W. Trevor King [Wed, 26 Feb 2014 19:31:59 +0000 (11:31 -0800)]
salt-minion/Dockerfile.template: Bump to Salt v2014.1.0

With 17ca2ae (Merge pull request #9024 from cachedout/#8976,
2013-12-05, saltstack/salt#9024, [1]), Salt gained the ability to
report LXC-ness as a grain, which is useful if you're writing Salt
states that will run in Docker containers.  The series landed before
the v2014.1 tag and was released with v2014.1.0.

[1]: https://github.com/saltstack/salt/pull/9024

10 years agosalt-minion/Dockerfile.template: Add 'need logger' to salt-minion init script
W. Trevor King [Wed, 26 Feb 2014 19:30:39 +0000 (11:30 -0800)]
salt-minion/Dockerfile.template: Add 'need logger' to salt-minion init script

Work around Gentoo's #502550 [1].

[1]: https://bugs.gentoo.org/show_bug.cgi?id=502550

10 years agosalt-minion/Dockerfile.template: Install dev-python/git-python
W. Trevor King [Wed, 26 Feb 2014 19:22:48 +0000 (11:22 -0800)]
salt-minion/Dockerfile.template: Install dev-python/git-python

Work around Gentoo's #485522 [1].

[1]: https://bugs.gentoo.org/show_bug.cgi?id=485522

10 years agosalt-minion/README.md: Discuss minion caching and sync_all
W. Trevor King [Tue, 25 Feb 2014 21:40:06 +0000 (13:40 -0800)]
salt-minion/README.md: Discuss minion caching and sync_all

I needed the explicit sync_all with Salt v0.17.0.  It's possible that
this is a bug that has been (or will be) fixed in future versions.

10 years ago*/README.md: Replace '-name' with '--name' and '-link' with '--link'
W. Trevor King [Mon, 24 Feb 2014 23:14:42 +0000 (15:14 -0800)]
*/README.md: Replace '-name' with '--name' and '-link' with '--link'

Docker has adopted GNU-style long options with v0.8.0 :) [1]:

  First step toward getopt style flags:

  As we keep compatibility with flags like -dns we can't have -i -t ->
  -it but at least - and -- are now correct.

[1]: https://github.com/dotcloud/docker/pull/3322
     e71dbf4 (update commands.go, 2013-12-23)

10 years agosalt-minion: Add a Salt State minion image
W. Trevor King [Mon, 24 Feb 2014 23:07:59 +0000 (15:07 -0800)]
salt-minion: Add a Salt State minion image

If you already have a Salt setup, it might be easier to use Salt to
provision your container than to convert your Salt configs into
Dockerfiles.

10 years agogentoo-portage/Dockerfile.template: Use distfiles.gentoo.org for GENTOO_MIRRORS
W. Trevor King [Fri, 21 Feb 2014 19:45:30 +0000 (11:45 -0800)]
gentoo-portage/Dockerfile.template: Use distfiles.gentoo.org for GENTOO_MIRRORS

This is more generic, and it's easy to customize the mirror by using a
package-cache container as a transparent proxy.  The clients can still
think they're using the generic mirror, but you can volume-mount an
/etc/conf.d/package-cache in the proxy container and set SOURCES to
whatever you like.

10 years agopackage-cache: Add an image with my package-cache proxy
W. Trevor King [Fri, 21 Feb 2014 18:48:05 +0000 (10:48 -0800)]
package-cache: Add an image with my package-cache proxy

Along with iptables instructions for transparently proxying Gentoo
mirrors using this image.

10 years agobuild.sh: Shift Kibana packages in the default REPOS list
W. Trevor King [Fri, 21 Feb 2014 17:50:12 +0000 (09:50 -0800)]
build.sh: Shift Kibana packages in the default REPOS list

'k' comes before 'm' in the alphabet ;).

10 years agogentoo-layman: Add a layman container for easy overlay Dockerfiles
W. Trevor King [Fri, 21 Feb 2014 17:48:38 +0000 (09:48 -0800)]
gentoo-layman: Add a layman container for easy overlay Dockerfiles

10 years agoelasticsearch/Dockerfile.template: Log to syslog instead of a local file
W. Trevor King [Wed, 19 Feb 2014 21:04:51 +0000 (13:04 -0800)]
elasticsearch/Dockerfile.template: Log to syslog instead of a local file

Use Log4j's SyslogAppender [1] to log to a local Syslog.  The Syslog
appender doesn't use /dev/log [2], so we also need to Syslog to listen
on the UDP socket.  Relevant threads from the Elasticsearch mailing
list [3,4].

[1]: http://logging.apache.org/log4j/2.x/manual/appenders.html#SyslogAppender
[2]: https://issues.apache.org/bugzilla/show_bug.cgi?id=44839
[3]: https://groups.google.com/forum/#!topic/elasticsearch/zeGWxzSQ4N4/discussion
     Subject: Using the syslog appender in elasticsearch
     From: Darron Froese
     Date: 2011-12-28
[4]: https://groups.google.com/forum/#!topic/elasticsearch/-ydujtOC5Fw/discussion
     Subject: use elasticsearch with syslog
     From: Olivier Morel
     Date: 2013-04-30

10 years agox.509/Makefile-link: Add a basic Makefile for linking wildcard certs
W. Trevor King [Sat, 15 Feb 2014 02:43:52 +0000 (18:43 -0800)]
x.509/Makefile-link: Add a basic Makefile for linking wildcard certs

10 years agox.509/Makefile-stunnel: Add a basic Makefile for creating self-signed certs
W. Trevor King [Fri, 14 Feb 2014 22:54:21 +0000 (14:54 -0800)]
x.509/Makefile-stunnel: Add a basic Makefile for creating self-signed certs

This is similar to Makefile-server, but it only creates a single
key/certificate pair.  It also bundles the private key and certificate
together in stunnel.pem, which is the format the stunnel image expects
(mount it at the container's /etc/stunnel/stunnel.pem).

10 years agox.509/Makefile-server: Add a basic Makefile for creating self-signed certs
W. Trevor King [Fri, 14 Feb 2014 22:47:25 +0000 (14:47 -0800)]
x.509/Makefile-server: Add a basic Makefile for creating self-signed certs

This requires a local CA, which you can build using Makefile-ca.  Use
CA_KEY and CA_CERT to point at your local CA:

  $ make -f Makefile-ca
  $ make -f Makefile-server CA_KEY=key.pem CA_CERT=ca.pem

10 years agox.509/Makefile-ca: Add a basic Makefile for creating self-signed CAs
W. Trevor King [Fri, 14 Feb 2014 22:31:59 +0000 (14:31 -0800)]
x.509/Makefile-ca: Add a basic Makefile for creating self-signed CAs

10 years agopush.sh: Add a helper script to mass-push repositories to a registry
W. Trevor King [Fri, 14 Feb 2014 20:35:32 +0000 (12:35 -0800)]
push.sh: Add a helper script to mass-push repositories to a registry

For example, after building, if you want to upload all of the new
images.  Any repositories that already exist on the registry will just
be re-tagged.

10 years agobuild.sh: Replace '-name' with '--name'
W. Trevor King [Fri, 14 Feb 2014 19:47:48 +0000 (11:47 -0800)]
build.sh: Replace '-name' with '--name'

Docker has adopted GNU-style long options with v0.8.0 :) [1]:

  First step toward getopt style flags:

  As we keep compatibility with flags like -dns we can't have -i -t ->
  -it but at least - and -- are now correct.

Strangely, I the short form doesn't always work for me anymore:

  $ docker run -name my-container -hostname my-container wking/gentoo /bin/bash
  flag provided but not defined: -hostname

Note that the -name works fine but the newer --hostname requires the
'--' form.

[1]: https://github.com/dotcloud/docker/pull/3322
     e71dbf4 (update commands.go, 2013-12-23)

10 years agokibana-azure: Add an image for Azure's custom Kibana
W. Trevor King [Fri, 14 Feb 2014 04:53:50 +0000 (20:53 -0800)]
kibana-azure: Add an image for Azure's custom Kibana

Pulling from https://github.com/wking/kibana/tree/azure instead of
from https://github.com/elasticsearch/kibana.

10 years agobuild.sh: Die with an error if a wget fails
W. Trevor King [Thu, 13 Feb 2014 23:11:30 +0000 (15:11 -0800)]
build.sh: Die with an error if a wget fails

10 years agobuild.sh: Use autobuilds for ARCH_URL instead of current-stage3
W. Trevor King [Thu, 13 Feb 2014 23:09:43 +0000 (15:09 -0800)]
build.sh: Use autobuilds for ARCH_URL instead of current-stage3

The autobuilds directory contains a few rounds of older stages, while
current-stage3 has only the most recent stage.

10 years agobuild.sh: Add BUILD_OPTS for custom build options
W. Trevor King [Thu, 13 Feb 2014 22:39:54 +0000 (14:39 -0800)]
build.sh: Add BUILD_OPTS for custom build options

For example, to rebuild a package without using the cache:

  $ REPOS=docker-registry BUILD_OPTS=--no-cache ./build.sh

which lets you update your image after the upstream repository has
changed.

10 years agodocker-registry: Add a Gentoo-based docker-registry
W. Trevor King [Wed, 12 Feb 2014 20:23:27 +0000 (12:23 -0800)]
docker-registry: Add a Gentoo-based docker-registry

The requirements are installed using Portage, because that handles
non-Python requirements gracefully, and caches all the source tarballs
for later use (e.g. if PyPI is down).  Note with the 20140206
snapshot, this installs dev-python/gevent-1.0_rc3, which is based on
libev not libevent like the pre 1.0 gevents [1]:

  New version of gevent uses libev and c-ares rather than libevent and
  includes all the dependencies in the release tarball.

You may have to bump your gevent requirements (docker-registry's
requirements.txt currently pins it at 0.13.8) or install
dev-libs/libevent if you want to run the tox test suite.

Bugsnag doesn't have a Gentoo package, so I don't install it.  That
means you won't be able to use Bugsnag with this image (unless you
install it yourself), and you'll want a version of docker-registry
that includes e253550 (Merge pull request #241 from
wking/optional-bugsnag, 2014-02-11).

[1]: https://pypi.python.org/pypi/gevent/0.13.8

10 years agobuild.sh: Bump DATE to 20140206
W. Trevor King [Mon, 10 Feb 2014 03:27:01 +0000 (19:27 -0800)]
build.sh: Bump DATE to 20140206

Move past the recent Python-and-/dev/shm issues now that Catalyst is
fixed.  I've built the full suite of images with 20140206 without
issues.

10 years agoREADME.md: Remove 'is mounted from the host' typo
W. Trevor King [Fri, 7 Feb 2014 23:34:32 +0000 (15:34 -0800)]
README.md: Remove 'is mounted from the host' typo

This was leftover from an old writeup of a host-mounted workaround,
and should never have been committed.

10 years agogentoo-portage/Dockerfile.template: chown portage:portage /usr/portage
W. Trevor King [Fri, 7 Feb 2014 20:22:48 +0000 (12:22 -0800)]
gentoo-portage/Dockerfile.template: chown portage:portage /usr/portage

When the usersync feature is enabled (which it is by default),
emerge-webrsync uses the owner and group of /usr/portage
(${repo_location}) for the unpacked tree.  This commit avoids having
the whole tree be owned by root:root.