Skip to content

Instantly share code, notes, and snippets.

@Eyjafjallajokull
Last active January 8, 2016 00:26
Show Gist options
  • Save Eyjafjallajokull/3b7cba8cbd90340315d9 to your computer and use it in GitHub Desktop.
Save Eyjafjallajokull/3b7cba8cbd90340315d9 to your computer and use it in GitHub Desktop.

docker-carrier

Note: This is just a proof of concept (aka. crazy idea). Feedback is very welcome. Please share your thoughts.

docker-carrier makes it super easy to run containerized applications.

Features

  • Easily install and run containerized applications
  • Run multiple versions of the same application
  • Use multiple package repositories

Example

To install firefox docker package:

docker-carrier install firefox

This will download firefox package, pull docker image and create executable in $PATH. To run application user can simply execute:

firefox

Install

// todo

Usage

Install package

docker-carrier install package

This command will:

  • search repositories for package
  • download latest version
  • create executable scripts in $PATH
    • if package (v1.0.0) defines executable named package-main, docker-carrier will create package-main, and package-main-1.0.0 executables in system $PATH

To install specific version of package append '@' and version to package name. Eg.:

docker-carrier install [email protected]

Uninstall package

docker-carrier uninstall package

Removes executable and docker image from system.

docker-carrier uninstall --purge package

Removes executable, docker image and all file artifacts generated by package.

Search package

docker-carrier search package

Search all enabled repositories for package.

List installed packages

docker-carrier list

Lists all installed packages and their versions.

Update package cache

docker-carrier update

Downloads package cache from enabled repositories.

Manage repositories

docker-carrier repo add repo_uri
docker-carrier repo rm repo_uri
docker-carrier repo list

Adds, removes or lists repositories.

Packages

Package is a separate repository with file named carrier.yml.

name: package_name
version: 1.0.0
image:
  name: org/name:tag
  file: Dockerfile
  path: .
  arguments:
executables:
  package_name:
    volumes:
      - $HOME/.package:/data
    environment:
      - DISPLAY=unix$DISPLAY
    device:
      - /dev/snd
install:
purge:
  • name - name of the package in repository
  • version - semantic version
  • image - defines which image to pull, or how to build it from scratch
    • to pull image only define name
    • to build image define file, path and optionally arguments
  • executables - defines how to create executable scripts
    • child keys define script names
  • install - array of commands or path to script which will be executed after pulling or building package
  • purge - array of commands or path to script which will be executed when purging package

// todo: volumes vs multiple versions of package

Repositories

// todo: package sources, package cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment