I'm getting the following error trying to install tcpdump in a 1.12.5 (I have also tried 1.13-rc5) boot2docker machine
$ docker-machine create -d virtualbox default
Running pre-create checks...
Creating machine...
(default) Copying /home/marius/.docker/machine/cache/boot2docker.iso to /home/marius/.docker/machine/machines/default/boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default
$ docker-machine ssh
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
_ _ ____ _ _
| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.12.5, build HEAD : fc49b1e - Fri Dec 16 12:44:49 UTC 2016
Docker version 1.12.5, build 7392c3b
docker@default:~$ tce-load -wi tcpdump.tcz
tcpdump.tcz.dep OK
libpcap.tcz.dep OK
libusb.tcz.dep OK
Downloading: libnl.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
libnl.tcz 100% |***********************************************************************************| 184k 0:00:00 ETA
libnl.tcz: OK
Downloading: udev-lib.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
udev-lib.tcz 100% |***********************************************************************************| 24576 0:00:00 ETA
udev-lib.tcz: OK
Downloading: libusb.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
libusb.tcz 100% |***********************************************************************************| 40960 0:00:00 ETA
libusb.tcz: OK
Downloading: libpcap.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
libpcap.tcz 100% |***********************************************************************************| 116k 0:00:00 ETA
libpcap.tcz: OK
Downloading: openssl.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
openssl.tcz 100% |***********************************************************************************| 2100k 0:00:00 ETA
openssl.tcz: OK
Downloading: netfilter-4.4.39-boot2docker.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: netfilter-4.4.39-boot2docker.tcz.md5.txt: No such file or directory
Error on netfilter-4.4.39-boot2docker.tcz
docker@default:~$
I imagine some boot2docker modification screwed up the filename, because by hand this works fine:
docker@default:~$ tce-load -wi netfilter-4.2.7-tinycore64.tcz
Downloading: netfilter-4.2.7-tinycore64.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
netfilter-4.2.7-tiny 100% |***********************************************************************************| 532k 0:00:00 ETA
netfilter-4.2.7-tinycore64.tcz: OK
and on a vanilla TinyCore ISO installing tcpdump works fine also.
I found the following workaround to install tcpdump, or any other package that depends on netfiler (of which there are many...)
tce-load -i netfilter-4.2.9-tinycore64.tcz/tmp/tce/optional/ folder and make a copy or link the netfilter-4.2.9-tinycore64.tcz[.md5.txt] files to netfilter-4.4.39-boot2docker.tcz[.md5.txt]Seems to work well enough to allow tcpdump and openvpn to work, although I haven't tested anything else. Anyway, would be great to get this fixed in boot2docker.
@marius311 : You're workaround works.
Seems like the file "netfilter-4.4.39-boot2docker.tcz" (or "netfilter-4.4.43-boot2docker.tcz" in my case) is not available in http://repo.tinycorelinux.net/7.x/x86/tcz/
@marius311 : good solution. I include a more explanatory version for anyone interested:
```# Attempt to install tcpdump.
tce-load -w -i tcptump.tcz
tce-status -i | grep netfilter
wget -O /tmp/tce/optional/netfilter-4.4.84-boot2docker.tcz http://distro.ibiblio.org/tinycorelinux/8.x/x86/tcz/netfilter-4.8.17-tinycore.tcz
wget -O /tmp/tce/optional/netfilter-4.4.84-boot2docker.tcz.md5.txt http://distro.ibiblio.org/tinycorelinux/8.x/x86/tcz/netfilter-4.8.17-tinycore.tcz.md5.txt
tce-load -w -i tcptump.tcz
```
+1
This is happening with more essential packages like net-bridging or netfilter because of the "boot2docker" versioning which, in my opinion at least, has no real value, keeping it to "tinycore64" or altering tce-load would make all these problems go away
The workaround is very complex, and you would need to be familiar with tinycore to know how to apply it correctly, here you have an example for 8.x, but some may be using 7.x; you also need to know where the tcz files are.
Update:
Actually I found an easier way to install most packages. You need to modify the tce-load script and replace the following line:
KERNELVER=$(uname -r)
With
KERNELVER="4.2.9-tinycore64"
This will work for version TCE version 7.x. For 8.x it would be:
KERNELVER="4.8.17-tinycore64"
@purplesrl's insight worked immediately for me and is significantly easier than marius311's good method, but accomplishes the identical goal.
This should work without quite so much fanfare now given our patch to tce-load:
That being said, I'd really recommend instead using tcpdump from a container (using tricks like --network=host as necessary).
Most helpful comment
Update:
Actually I found an easier way to install most packages. You need to modify the tce-load script and replace the following line:
KERNELVER=$(uname -r)With
KERNELVER="4.2.9-tinycore64"This will work for version TCE version 7.x. For 8.x it would be:
KERNELVER="4.8.17-tinycore64"