How to run HIPL inside docker?

Asked by Miika Komu

How to run HIPL inside a docker container?

Question information

Language:
English Edit question
Status:
Solved
For:
HIPL Edit question
Assignee:
No assignee Edit question
Solved by:
Miika Komu
Solved:
Last query:
Last reply:
Revision history for this message
Miika Komu (miika-iki) said :
#1

Make sure that your docker version is recent enough:

Docker version 1.3.2, build 39fa2fa

For Ubuntu LTS, you can download the latest docker version from here:

http://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit

Docker 1.2 may work too, but did not test. Then, continue with HIPL stuff:

1. Install HIPL dependencies from INSTALL file
2. Build HIPL binaries with autoreconf --install && ./configure && make bin
3. Make a file named "Dockerfile" with the following content:
  FROM ubuntu:14.04
  MAINTAINER Me <email address hidden>
  ADD hipl-daemon_1.0.8-6457_amd64.deb /tmp/
  RUN apt-get update
  RUN apt-get install -y libssl1.0.0 openssl libnet-ip-perl libnet-dns-perl
  RUN dpkg -i /tmp/hipl-daemon_1.0.8-6457_amd64.deb
  EXPOSE 10500/udp
3. sudo docker build -t hipl/minimal .
4. hipd -k # hipd at the host machine in order to get all kernel modules loaded
5. docker run -t -i --cap-add=NET_ADMIN hipl/minimal /bin/bash

Then continue with testing hipd inside the container:

root@3c6055ee4e54:/# ip link add dummy0 type dummy
root@3c6055ee4e54:/# hipd -kmpb
root@3c6055ee4e54:/# hipconf daemon add map 2001:1d:392e:a450:2cd3:75e1:6098:8104 193.167.187.130
Mapped v4 to v6.
mapped v6: 193.167.187.130
Sending user message 2 to HIPD on socket 3
Sent 88 bytes
Waiting to receive daemon info.
88 bytes received from HIP daemon.
User message was sent successfully to the HIP daemon.
root@3c6055ee4e54:/# ping6 2001:1d:392e:a450:2cd3:75e1:6098:8104
PING 2001:1d:392e:a450:2cd3:75e1:6098:8104(2001:1d:392e:a450:2cd3:75e1:6098:8104) 56 data bytes
64 bytes from 2001:1d:392e:a450:2cd3:75e1:6098:8104: icmp_seq=2 ttl=55 time=8.98 ms
64 bytes from 2001:1d:392e:a450:2cd3:75e1:6098:8104: icmp_seq=3 ttl=55 time=8.92 ms
^C
--- 2001:1d:392e:a450:2cd3:75e1:6098:8104 ping statistics ---
3 packets transmitted, 2 received, 33% packet loss, time 2010ms
rtt min/avg/max/mdev = 8.923/8.954/8.986/0.099 ms

You can also some other remote host for testing.

The instructions are still a bit manual and rough from the edges, but maybe I can later automatize this and upload precreated docker images. Also, hipfw and dnsproxy instructions are still missing.