Skip to content

Commit

Permalink
Implement Docker on ZFS
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Gautier <baloo@gandi.net>
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
  • Loading branch information
Mic92 committed May 8, 2015
1 parent 23abd51 commit d5151ca
Show file tree
Hide file tree
Showing 20 changed files with 1,985 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
FROM ubuntu:14.04
MAINTAINER Tianon Gravi <admwiggin@gmail.com> (@tianon)

RUN apt-key adv --keyserver pool.sks-keyservers.net --recv-keys E871F18B51E0147C77796AC81196BA81F6B0FC61
RUN echo deb http://ppa.launchpad.net/zfs-native/stable/ubuntu trusty main > /etc/apt/sources.list.d/zfs.list

# Packaged dependencies
RUN apt-get update && apt-get install -y \
apparmor \
Expand All @@ -50,6 +53,8 @@ RUN apt-get update && apt-get install -y \
ruby1.9.1 \
ruby1.9.1-dev \
s3cmd=1.1.0* \
ubuntu-zfs \
libzfs-dev \
--no-install-recommends

# Get lvm2 source for compiling statically
Expand Down
21 changes: 21 additions & 0 deletions contrib/check-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ check_flags() {
done
}

check_command() {
if command -v "$1" >/dev/null 2>&1; then
wrap_good "$1 command" 'available'
else
wrap_bad "$1 command" 'missing'
fi
}

check_device() {
if [ -c "$1" ]; then
wrap_good "$1" 'present'
else
wrap_bad "$1" 'missing'
fi
}

if [ ! -e "$CONFIG" ]; then
wrap_warning "warning: $CONFIG does not exist, searching other paths for kernel config..."
for tryConfig in "${possibleConfigs[@]}"; do
Expand Down Expand Up @@ -182,6 +198,11 @@ echo '- Storage Drivers:'

echo '- "'$(wrap_color 'overlay' blue)'":'
check_flags OVERLAY_FS EXT4_FS_SECURITY EXT4_FS_POSIX_ACL | sed 's/^/ /'

echo '- "'$(wrap_color 'zfs' blue)'":'
echo " - $(check_device /dev/zfs)"
echo " - $(check_command zfs)"
echo " - $(check_command zpool)"
} | sed 's/^/ /'
echo

Expand Down
7 changes: 7 additions & 0 deletions daemon/daemon_zfs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// +build !exclude_graphdriver_zfs

package daemon

import (
_ "github.com/docker/docker/daemon/graphdriver/zfs"
)
1 change: 1 addition & 0 deletions daemon/graphdriver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ var (
priority = []string{
"aufs",
"btrfs",
"zfs",
"devicemapper",
"overlay",
"vfs",
Expand Down
1 change: 1 addition & 0 deletions daemon/graphdriver/zfs/MAINTAINERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Arthur Gautier <baloo@gandi.net> (@baloose)
Loading

0 comments on commit d5151ca

Please sign in to comment.