Docker Community Forums

Share and learn in the Docker community.

32 bits, 64 bits and Tiny Core Linux 6.0 as a base for boot2docker.iso


(Afressancourt) #1

Hello,

I am new on this forum, even if I follow Docker for a while now.

I have a question related to building the boot2docker.iso file that is used by boot2docker. I have tried to compile and install OpenVSwitch in this iso to play with the way networking is done in boot2docker. In the process, I came accross several difficulties related to the fact that some libraries in boot2docker.iso were in 32-bits version. Reading the comments in the Dockerfile, I have seen that it raises issues for VirtualBox shared directory functionality too.

Notably, the tcl-roofs used in the build is a 32-bits library.

Since January 5th, TinyCoreLinux has shipped its v6.0. Among the novelties, rootfs.gz comes in 64-bits version (rootfs64.gz).

I have tried changing some elements in the Dockerfile to point to Tiny Core Linux v6.0, but I am a bit stuck now. The changes I have done are:

ENV TCL_REPO_BASE http://tinycorelinux.net/6.x/x86_64

[…]

RUN curl -L -o /tcl_rootfs.gz $TCL_REPO_BASE/release/distribution_files/rootfs64.gz

The process compiles and results in a .iso (yay) that can be used to start a VM in VirtualBox (yay) but I am facing the following problems (not_yay):

  • acpid and ntpclient are not in the x86_64 repository for TinyCoreLinux (yet)
  • somehow, eth1 interface is not created at bootstrap, and the machine fails generating certs and being reachable using boot2docker.

The first issue is manageable, but I am stuck with the second one. After some hours digging in the issue, I don’t have an answer, so I ask the community’s help and wisdom on the matter.

Thanks !

Antoine


(Sven Dowideit) #2

I was talking to @tianon and he was also interested in this.


(Afressancourt) #3

I managed to get the eth1 device to work by switching the VboxGuestAdditions binary to use only the 64 bits version.

SSH is not working yet. @sven, could the generate-cert tool be involved in the issue?

Thanks a lot !


I was too quick in my previous message. Carefully looking at the console when starting the image, I got the following issues:

sysctl: net.ipv6.conf.all.forwarding is an unknown key

[…]

umount: can’t forcibly umount /var/lib/docker: No such file or directory
mv: can’t rename ‘/usr/local/etc/ssh/ssh_config.example’: No such file or directory

This one seems a little bit more of an issue. I will dig in the Dockerfile to see if I can fix that.
[…]

/etc/rc.d/acpid: line2: /usr/local/etc/init.d/acpid: not found

This one is rather normal given that I have removed it from the tce loaded extensions.


(Sven Dowideit) #4

generate_cert is only used for the Docker daemon TLS, so should not cause ssh to be a problem.

hope you have some success in the mean-time :slight_smile:


(Sven Dowideit) #5

oh - actually, once you have a shell, compare your new fs’s sshd options with the 32 bit vm’s files - there were some options that we needed.

When you say SSH is not working yet - what are the symptoms you see?


(Afressancourt) #6

Hi Sven,

I went a bit farther.

The issue with SSH came from the fact that, in the new FS, the example ssh config file is named “ssh_config_example” instead of “ssh_config.example”. I fixed that via a ugly hack, and SSH starts.

Now, the problem I have is that the SSH daemon is started but the boot2docker up script returns an error when it comes to doing

executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/afressancourt/.ssh/id_boot2docker docker@localhost ip addr show dev eth1

Note that executing the command

ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/afressancourt/.ssh/id_boot2docker docker@localhost ip addr show dev eth1

is working. I didn’t have the time to dig in the issue further.

One question I have now: I commented the following line in the Dockerfile because it returns an error

{ $ROOTFS/usr/local/bin/docker version || true; }

What is this line for?

If you want to test what I have done, I have forked the git repo for boot2docker.

Thanks !


(Sven Dowideit) #7

I added that line so that the version of docker installed is printed during the docker build - I used to build the boot2docker releases using automated builds on the Docker Hub.

what is the error you get?


(Afressancourt) #8

Hello Sven,

Sorry for the late answer.

The error I got returns a:

time=“2015-02-06T11:39:39Z” level=“fatal” msg=“Get http:///var/run/docker.sock/v1.16/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?”

But it is not critical.

Digging a bit more, it turns out that when I run “boot2docker up”, I don’t have a result for the ip addr command executed from ssh because /usr/local/sbin is not in the path. I have tried to export it in the path in the bootscript.sh file, but the change is not taken into consideration using SSH.

Thanks for your help !


(Afressancourt) #9

Hello,

I made good progresses, as now, I have a Dockerfile allowing to make a 64-bits TinyCoreLinux image. The Dockerfile is on my github (https://github.com/afressancourt/boot2docker)

Some work remaining:

  • Adapting the changes to Docker 1.5 to see if everything is fine
  • Stopping the VM is still problematic because the acpid module is not yet available for TinyCoreLinux in 64-bits fashion. I will work on this bit as soon as possible.

(Sven Dowideit) #10

@tianon - can we start thinking about this for 1.6 ?

@afressancourt this might be a good time to make a Pull request - as we’re just at the begining of the 1.6 dev cycle.


(Afressancourt) #11

Hello @sven,

I will do my modifications from the 1.5 Dockerfile to do my pullrequest in order for you to have less efforts to do to integrate the modifications.

By the way, I am making good progress on compiling acpid for TCL6.0. I hope I can integrate that in the pullrequest too.


(Fabio Rapposelli) #12

Folks, I’m very interested in helping with this as I’m working to integrate shared folders support for VMware Fusion and Workstation and they don’t play well with the current 32/64 bit mix, I took a stab at @afressancourt work and have vmhgfs working already.


(Afressancourt) #13

hello @frapposelli,

That’s great you jump on the thread, because I realized today that the shared folder functionnality is not working as expected using my modification. I get the mount.vboxfs file in the /sbin directory as expected, but launching ‘mount.vboxfs’ returns a command not found error.

I will keep you posted on acpid later this evening, but it looks OK for now on a plain TCL6.0 VM.


(Sven Dowideit) #14

@afressancourt - https://github.com/boot2docker/boot2docker/pull/747


(Afressancourt) #15

I have just issued a pull request myself on the matter (#748) The status I shared there is the following:

What is supported:

  • The VM can be initiated and launched via boot2docker-cli.
  • Containers can be loaded and used properly
  • SSH using boot2docker is working properly

What is not yet there:

  • ACPID and NTPD are not yet there, as 64bit flavours of the tcz extensions are not yet available. As an alternative to stop the boot2docker vm, “boot2docker poweroff” can be used.
  • Shared folder using Virtualbox is not functional. vboxsf seems to compile properly, yet /sbin/mountfs.vboxsf can’t be used.