Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build docker 1.13 on FreeBSD 11? #31303

Closed
mrmarbury opened this issue Feb 23, 2017 · 8 comments
Closed

How to build docker 1.13 on FreeBSD 11? #31303

mrmarbury opened this issue Feb 23, 2017 · 8 comments

Comments

@mrmarbury
Copy link

I can't seem to find any information on this. The docker-freebsd port is unmaintained since 2015 and running make.sh on the git clone fails with:

---> Making bundle: binary-client (in bundles/1.13.1/binary-client)
Building: bundles/1.13.1/binary-client/docker-1.13.1
Created binary: bundles/1.13.1/binary-client/docker-1.13.1

---> Making bundle: binary-daemon (in bundles/1.13.1/binary-daemon)
Building: bundles/1.13.1/binary-daemon/dockerd-1.13.1
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/drivers/bridge/bridge.go:22:2: no buildable Go source files in /home/marbury/Projects/Cloned/docker/.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns

But since some people use docker with FreeBSD I assume there is a way to run it?

I need some support here, please

Thanks so much

@AkihiroSuda
Copy link
Member

dockerd is not supported on FreeBSD.

@justincormack Do you know anyone trying to support FreeBSD?

@justincormack
Copy link
Contributor

justincormack commented Feb 27, 2017 via email

@mrmarbury
Copy link
Author

mrmarbury commented Feb 27, 2017

Well this is unfortunate. Back in late 2015 there have been numerous news on tech blogs going like this: "Docker now officially supported on FreeBSD" which got my hopes up. But since I didn't use it back then I just memorized it as nice info. Now I have seen that there is just this one port from @kvasdopil that was made in 7/15 as a (as it seems) one time thing. Which makes this kind of a useless endeavour. As I have seen a "FreeBSD" build icon (even though it is disabled) and some Issue entries regarding FreeBSD, I was just thinking that it might work anyway, if I just compiled it for myself. Dang

EDIT:
There is even one fork by @thaJeztah with a last commit in October 2016
I don't think it is helpful if everybody works on their own version without upstreaming it. Maybe there is a way to get people to push their changes to upstream somehow ...

@justincormack
Copy link
Contributor

justincormack commented Feb 27, 2017 via email

@aleksmelnikov
Copy link

Just my experiments with Freebsd 11.

$go version
go version go1.8 freebsd/amd64

$cd /tmp
$git clone git://github.com/docker/docker.git
$cd docker
$./hack/make.sh
...
Building: bundles/17.04.0-dev/binary-daemon/dockerd-17.04.0-dev
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/drivers/bridge/bridge.go:22:2: no buildable Go source files in /tmp/docker/.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns

$cp /tmp/docker/vendor/github.com/docker/libnetwork/ns/init_linux.go /tmp/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go

$./hack/make.sh
...
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:67: undefined: syscall.Gettid
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:77: undefined: syscall.NETLINK_ROUTE
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:84: undefined: syscall.NETLINK_XFRM
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:99: undefined: syscall.AF_NETLINK
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:99: undefined: syscall.NETLINK_XFRM

Does syscall.Gettid, syscall.NETLINK_ROUTE, syscall.NETLINK_XFRM, syscall.AF_NETLINK, syscall.NETLINK_XFRM not exist for Freebsd?

So, I did move it all from init_freebsd.go for testing only!
$cat /tmp/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go
package ns

import (

)

$./hack/make.sh

$ls -l /tmp/docker/bundles/17.04.0-dev/binary-client/docker-17.04.0-dev
-rwxr-xr-x 1 root wheel 12386457 8 марта 16:22 /tmp/docker/bundles/17.04.0-dev/binary-client/docker-17.04.0-dev

@aleksmelnikov
Copy link

Test with syscall.Gettid, syscall.NETLINK_ROUTE, syscall.NETLINK_XFRM, syscall.AF_NETLINK, syscall.NETLINK_XFRM.

$cat syscall.go
package main
import "syscall"
func main() {
_ = syscall.AF_NETLINK
}

$GOOS=freebsd GOARCH=amd64 go build syscall.go
./syscall.go:6: undefined: syscall.AF_NETLINK

$GOOS=linux GOARCH=amd64 go build syscall.go
no errors

@AkihiroSuda
Copy link
Member

Before porting dockerd you would need to port run c.
Also, before porting runc you would need to revise the OCI spec as well.

@thaJeztah
Copy link
Member

I'll go ahead and close this issue, because compiling for FreeBSD won't work currently (without someone working on porting it), but feel free to continue the conversation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants