mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
Merge pull request #9650 from ragnard/docker-fixes
docker: Minor improvements, fix failing test
This commit is contained in:
commit
747e7e7b42
@ -43,6 +43,17 @@ in
|
||||
in future. So set this option explicitly to false if you wish.
|
||||
'';
|
||||
};
|
||||
storageDriver =
|
||||
mkOption {
|
||||
type = types.enum ["aufs" "btrfs" "devicemapper" "overlay" "zfs"];
|
||||
description =
|
||||
''
|
||||
This option determines which Docker storage driver to use.
|
||||
It is required but lacks a default value as its most
|
||||
suitable value will depend the filesystems available on the
|
||||
host.
|
||||
'';
|
||||
};
|
||||
extraOptions =
|
||||
mkOption {
|
||||
type = types.separatedString " ";
|
||||
@ -85,7 +96,7 @@ in
|
||||
after = [ "network.target" "docker.socket" ];
|
||||
requires = [ "docker.socket" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.docker}/bin/docker --daemon=true --host=fd:// --group=docker ${cfg.extraOptions}";
|
||||
ExecStart = "${pkgs.docker}/bin/docker daemon --host=fd:// --group=docker --storage-driver=${cfg.storageDriver} ${cfg.extraOptions}";
|
||||
# I'm not sure if that limits aren't too high, but it's what
|
||||
# goes in config bundled with docker itself
|
||||
LimitNOFILE = 1048576;
|
||||
@ -111,7 +122,7 @@ in
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.docker}/bin/docker --daemon=true --group=docker ${cfg.extraOptions}";
|
||||
ExecStart = "${pkgs.docker}/bin/docker daemon --group=docker --storage-driver=${cfg.storageDriver} ${cfg.extraOptions}";
|
||||
# I'm not sure if that limits aren't too high, but it's what
|
||||
# goes in config bundled with docker itself
|
||||
LimitNOFILE = 1048576;
|
||||
|
@ -11,6 +11,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "overlay";
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user