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

FreeBSD: Linux Container Support and BuildKit Integration #2425

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions docs/freebsd.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ instructions in the respective repositories.

## Usage

You can use the `knast/freebsd` image to run a standard FreeBSD 13 jail:
You can use the `dougrabson/freebsd13.2-small` image to run a FreeBSD 13 jail:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dougrabson/freebsd13.2-small is smaller, maintained and made by a person who actually knows how to build FreeBSD root filesystems.

knast/freebsd is made by me, and I don't really maintain it anymore.


```sh
nerdctl run --net none -it knast/freebsd:13-STABLE
nerdctl run --net none -it dougrabson/freebsd13.2-small
```

Alternatively use `--platform` parameter to run linux containers

```sh
nerdctl run --platform linux --net none -it amazonlinux:2
```


## Limitations & Bugs

- :warning: CNI & CNI plugins are not yet ported to FreeBSD. The only supported
network type is `none`
- :warning: buildkit is not yet ported to FreeBSD.
- [ ] https://github.com/tonistiigi/fsutil/pull/109 - buildkit dependency
- [ ] https://github.com/moby/moby/pull/42866 - buildkit dependency
- :warning: Linuxulator containers support is
WIP. https://github.com/containerd/nerdctl/issues/280 https://github.com/containerd/containerd/pull/5480

- :bug: `nerdctl compose` commands currently don't work. https://github.com/containerd/containerd/pull/5991
4 changes: 2 additions & 2 deletions pkg/buildkitutil/buildkitutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ func PingBKDaemon(buildkitHost string) error {
}

func pingBKDaemon(buildkitHost string) (output string, _ error) {
if runtime.GOOS != "linux" {
return "", errors.New("only linux is supported")
if runtime.GOOS != "linux" && runtime.GOOS != "freebsd" {
return "", errors.New("only linux and freebsd are supported")
}
buildctlBinary, err := BuildctlBinary()
if err != nil {
Expand Down