name: docker
version: 1.11.1-1
summary: Docker Linux container runtime
description: Docker complements kernel namespacing with a high-level API which operates at the process level. It runs unix processes with strong guarantees of isolation and repeatability across servers.

apps:
  docker:
    command: docker
    # TODO permissions

  dockerd:
    command: docker daemon
    daemon: simple
    # TODO permissions

parts:
  docker:
    plugin: shell
    source: https://github.com/docker/docker/archive/v1.11.1.tar.gz
    source-type: tar
    shell: bash
    shell-flags: ['-ex']
    shell-command: |
      for patch in "$SNAPDIR"/patches/*.patch; do
          patch -p1 < "$patch"
      done
      export DOCKER_GITCOMMIT="$(
          git ls-remote --tags \
              https://github.com/docker/docker.git \
              "refs/tags/v$(cat VERSION)^{}" \
          | cut -b1-7
      )"
      export AUTO_GOPATH=1
      ./hack/make.sh dynbinary
      dockerBin='bundles/latest/dynbinary/docker'
      "$dockerBin" -v
      ls -l bundles/latest/*/
      install -d "$DESTDIR/bin"
      install -T "$(readlink -f "$dockerBin")" "$DESTDIR/bin/docker"
    build-packages:
      - btrfs-tools
      - gcc
      - golang-go
      - libc6-dev
      - libdevmapper-dev

name: docker
version: 1.11.1-1
summary: Docker Linux container runtime
description: Docker complements kernel namespacing with a high-level API which operates at the process level. It runs unix processes with strong guarantees of isolation and repeatability across servers.

apps:
  docker:
    command: docker
    # TODO permissions

  dockerd:
    command: docker daemon
    daemon: simple
    # TODO permissions

parts:
  docker:
    plugin: shell
    source: https://github.com/docker/docker/archive/v1.11.1.tar.gz
    source-type: tar
    shell: bash
    shell-flags: ['-ex']
    shell-command: |
      for patch in "$SNAPDIR"/patches/*.patch; do
          patch -p1 -i "$patch"
      done
      export DOCKER_GITCOMMIT="$(
          git ls-remote --tags \
              https://github.com/docker/docker.git \
              "refs/tags/v$(cat VERSION)^{}" \
          | cut -b1-7
      )"
      export AUTO_GOPATH=1
      ./hack/make.sh dynbinary
      dockerBin='bundles/latest/dynbinary/docker'
      "$dockerBin" -v
      ls -l bundles/latest/*/
      install -d "$DESTDIR/bin"
      install -T "$(readlink -f "$dockerBin")" "$DESTDIR/bin/docker"
    build-packages:
      - btrfs-tools
      - gcc
      - golang-go
      - libc6-dev
      - libdevmapper-dev

Use "patch -i" instead of "patch <" for better "set -x" output
Use "patch -i" instead of "patch <" for better "set -x" output
