Browse Source

new: [docker] new charm.

This charms creates a docker LXC. Within this LXC, you can use docker
commands.

Note that this charm require LXC require privileges from apparmor to
allow nested LXC. Last version of lxc-scripts is able to use the
``config`` file to add it the final LXC config file.
postgres
Valentin Lab 10 years ago
parent
commit
ac6ce38bf8
  1. 1
      precise/docker/config
  2. 23
      precise/docker/hooks/install
  3. 3
      precise/docker/hooks/start
  4. 3
      precise/docker/hooks/stop
  5. 8
      precise/docker/metadata.yaml
  6. 1
      precise/docker/revision
  7. 15
      precise/docker/src/etc/default/docker

1
precise/docker/config

@ -0,0 +1 @@
lxc.aa_profile = unconfined

23
precise/docker/hooks/install

@ -0,0 +1,23 @@
#!/bin/bash
set -eux # -x for verbose logging to juju debug-log
##
## Install lxc, because docker can only work with lxc
## see: https://github.com/docker/docker/issues/6783
apt-get -y install lxc
##
## Install docker
##
curl https://get.docker.io | sh
##
## Init.d and defaults running options
##
cp src/etc/default/docker /etc/default/

3
precise/docker/hooks/start

@ -0,0 +1,3 @@
#!/bin/bash
juju-log "Nothing to Start for base."

3
precise/docker/hooks/stop

@ -0,0 +1,3 @@
#!/bin/bash
juju-log "Nothing to stop for base."

8
precise/docker/metadata.yaml

@ -0,0 +1,8 @@
name: docker
summary: "Docker Host"
maintainer: "Valentin Lab <valentin.lab@kalysto.org>"
inherit: base-0k
description: |
Docker Host
data-resources:
- /var/lib/docker

1
precise/docker/revision

@ -0,0 +1 @@
0

15
precise/docker/src/etc/default/docker

@ -0,0 +1,15 @@
# Docker Upstart and SysVinit configuration file
# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
DOCKER_OPTS="--exec-driver=lxc"
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"
# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"
Loading…
Cancel
Save