Trouble when I want to used FreeBSD images

Hi all,

When I try to build my own image based on lexaguskov/freebsd:10.1 like that:

FROM lexaguskov/freebsd:10.1

MAINTAINER Agilitic (Sinouplen <>)

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

Thanks for your help,
Best Regards,

Docker is not a virtualization platform, so running freebsd binaries under a linux host won’t work.


one question I have is what is the error code 139??

is the related to the PID ?

I know, but why it’s possible to run CentOS, Ubuntu binaries under FreeBSD host linux and not to run FreeBSD binaries under CentOS or Ubuntu?

For example:

The segmentation fault (error code 139) is the result of the command “/bin/sh -c ls”.

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 for your answer.
I understand the difference between those OS.

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.

Thanks all for your helpness.


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.