forked from larsyencken/marelle-deps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker.pl
38 lines (32 loc) · 1.15 KB
/
docker.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%
% docker.pl
% computer-deps
%
% LXC virtualisation.
%
command_pkg(docker).
installs_with_apt(docker, 'lxc-docker').
depends(docker, linux(_), '__docker ppa').
depends(docker, osx, [boot2docker]).
meet(docker, osx) :-
curl('https://get.docker.io/builds/Darwin/x86_64/docker-latest', '~/.computer/bin/docker'),
bash('chmod a+x ~/.computer/bin/docker').
git_step('docker-source',
'https://github.com/dotcloud/docker',
'~/.computer/docker'
).
pkg('__docker ppa').
met('__docker ppa', linux(_)) :-
isfile('/etc/apt/sources.list.d/docker.list').
meet('__docker ppa', linux(CodeName)) :-
member(CodeName, [precise, quantal]),
bash('sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E61D797F63561DC6'),
join(['deb http://ppa.launchpad.net/dotcloud/lxc-docker/ubuntu ', CodeName, ' main'], AptLine),
sudo_tell('/etc/apt/sources.list.d/docker.list'),
writeln(AptLine),
told,
bash('sudo apt-get update').
command_pkg(boot2docker).
meet(boot2docker, osx) :-
curl('https://raw.github.com/steeve/boot2docker/master/boot2docker', '~/.computer/bin/boot2docker'),
bash('chmod a+x ~/.computer/bin/boot2docker').