RunInDocker.sh
Go to the documentation of this file.
1 
2 ##################################################
3 # Ubuntu Instructions to setup grl with Docker
4 ##################################################
5 
6 # Install docker with the line below
7 
8 curl -sSL https://get.docker.com/ubuntu/ | sudo sh
9 
10 
11 # source: https://www.docker.com/
12 
13 ####################
14 # give docker permission to run
15 ####################
16 
17 sudo gpasswd -a ${USER} docker
18 
19 # source : http://dev-maziarz.blogspot.com/2015/01/running-docker-sock-permission-denied.html
20 
21 
22 ####################
23 # log out then log in
24 ####################
25 
26 ###########################################
27 # clone the docker setup script I modified
28 ##########################################
29 
30 git clone https://github.com/ahundt/install-clang.git
31 
32 # source : https://registry.hub.docker.com/u/rsmmr/clang/
33 
34 ####################
35 # setup c++ environment in a protected box so it doesn't mess with your OS
36 ####################
37 
38 
39 # optional step that may speed things up:
40 # docker pull rsmmr/clang
41 
42 cd install-clang
43 
44 
45 ####################
46 # complete setup c++ environment in a protected box so it doesn't mess with your OS
47 ####################
48 
49 make docker-build
50 
51 ####################
52 # run c++ environment as if it was a separate OS.
53 ####################
54 
55 # typically you should only need this next
56 # line if you are making changes and
57 # just want to rerun the OS.
58 
59 make docker-run
60 
61 
62 # build files should be in /root
63 
64 #########################################
65 # how to cleanup if something goes wrong:
66 #########################################
67 # http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html
68 # http://docs.docker.com/reference/commandline/cli/
69 # bash script: https://github.com/blueyed/dotfiles/blob/master/usr/bin/docker-cleanup
70 # github issue requesing cleanup: https://github.com/docker/docker/issues/928
71 
72 
73 #########################################
74 # running apps that have a gui, such as vrep, inside a docker container
75 #########################################
76 
77 # these options have not yet been tested
78 
79 #http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/
80 #
81 #http://www.jann.cc/2014/09/06/sandboxing_proprietary_applications_with_docker.html#running-gui-applications
82 #https://github.com/rogaha/docker-desktop
83 #
84 #http://blog.docker.com/2013/07/docker-desktop-your-desktop-over-ssh-running-inside-of-a-docker-container/
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 ###############################################################
97 #alternative, ignore below here
98 ###############################################################
99 
100 
101 # install docker
102 curl -sSL https://get.docker.com/ubuntu/ | sudo sh
103 
104 ####################
105 # give docker permission to run
106 ####################
107 
108 sudo gpasswd -a ${USER} docker
109 
110 # source : http://dev-maziarz.blogspot.com/2015/01/running-docker-sock-permission-denied.html
111 
112 
113 ####################
114 # log out then log in
115 ####################
116 
117 
118 ####################
119 # setup c++ environment in a protected box so it doesn't mess with your OS
120 ####################
121 
122 docker pull sango/cpp-clang
123 
124 # source : https://registry.hub.docker.com/u/sango/cpp-clang/
125 
126 
127 # update
128 docker run --user="root" sango/cpp-clang apt-get update
129 
130 
131 docker run --user="root" sango/cpp-clang apt-get install -y cmake libtool autoconf automake uuid-dev build-essential libboost-all-dev libeigen3-dev wget curl
132 
133 
134 ####################
135 # zmq
136 ####################
137 
138 # source : https://maddigitiser.wordpress.com/2013/05/02/installing-zeromq-on-ubuntu-13-04/
139 
140 ########
141 # grl
142 ########
143 
144 docker run --user="root" sango/cpp-clang /bin/sh -c 'git clone https://github.com/zeromq/azmq.git /root/azmq/ && cd azmq && mkdir build && cd build && cmake .. && make && make test && make install"
145 docker run --user="root" sango/cpp-clang git clone https://github.com/ahundt/grl.git /root/grl