When I try to build my own image based on lexaguskov/freebsd:10.1 like that:
FROM lexaguskov/freebsd:10.1
MAINTAINER Agilitic (Sinouplen <sinouplen@gmail.com>)
RUN df -u
I have this error: Step 2 : RUN df -u —> Running in b18219437286 The command ‘/bin/sh -c df -u’ returned a non-zero code: 139
Is it possible to create FreeBSD images under ubuntu OS?
If yes, I don’t understand the error when I try to build my image on RUN command
If I change the command to execute on build image to show content of directory for exemple, I have this error: Step 2 : RUN ls —> Running in 7c602f01f023 The command ‘/bin/sh -c ls’ returned a non-zero code: 139
FreeBSD has linux binary compatibility. It emulates the linux API so you can run linux binaries on your existing freebsd system. Linux doesn’t have a FreeBSD compatibility layer, and therefore won’t run freebsd binaries.
Docker can run (and build) images which share the same kernel. CentOS and Ubuntu have different root file systems, so Docker includes those inside the image, but the kernels are essentially the same.
FreeBSD does not use the same kernel as Linux, so Linux-based images won’t work exactly.
Thanks Rufus, I know that but I didn’t understand why FreeBSD host can run CentOS and Ubuntu images because linux based is different and why it’s not possible to run FreeBSD images on CentOS or Ubuntu host.
Jeff has answer at this question and know I understand this point.
Hmm, wouldn’t it be good if the virtual images of docker (boot2docker) would be based on freebsd then? If it were based on freebsd you could run freebsd & debian etc. on it.