Skip to content

Commit

Permalink
Remove "seccomp" build tag
Browse files Browse the repository at this point in the history
Similar to the (now removed) `apparmor` build tag, this build-time toggle existed for users who needed to build without the `libseccomp` library.  That's no longer necessary, and given the importance of seccomp to the overall default security profile of Docker containers, it makes sense that any binary built for Linux should support (and use by default) seccomp if the underlying host does.

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
  • Loading branch information
tianon committed May 12, 2022
1 parent 888c618 commit c9e19a2
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 74 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ARG SYSTEMD="false"
ARG GO_VERSION=1.18.2
ARG DEBIAN_FRONTEND=noninteractive
ARG VPNKIT_VERSION=0.5.0
ARG DOCKER_BUILDTAGS="apparmor seccomp"

ARG BASE_DEBIAN_DISTRO="bullseye"
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"
Expand Down
26 changes: 0 additions & 26 deletions daemon/seccomp_disabled.go

This file was deleted.

3 changes: 0 additions & 3 deletions daemon/seccomp_linux.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build linux && seccomp
// +build linux,seccomp

package daemon // import "github.com/docker/docker/daemon"

import (
Expand Down
3 changes: 0 additions & 3 deletions daemon/seccomp_linux_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build linux && seccomp
// +build linux,seccomp

package daemon // import "github.com/docker/docker/daemon"

import (
Expand Down
2 changes: 1 addition & 1 deletion hack/test/unit
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
set -eux -o pipefail

BUILDFLAGS=(-tags 'netgo seccomp libdm_no_deferred_remove')
BUILDFLAGS=(-tags 'netgo libdm_no_deferred_remove')
TESTFLAGS+=" -test.timeout=${TIMEOUT:-5m}"
TESTDIRS="${TESTDIRS:-./...}"
exclude_paths='/vendor/|/integration'
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/requirements_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func cgroupCpuset() bool {
}

func seccompEnabled() bool {
return supportsSeccomp && SysInfo.Seccomp
return SysInfo.Seccomp
}

func bridgeNfIptables() bool {
Expand Down
9 changes: 0 additions & 9 deletions integration-cli/test_vars_noseccomp_test.go

This file was deleted.

9 changes: 0 additions & 9 deletions integration-cli/test_vars_seccomp_test.go

This file was deleted.

3 changes: 0 additions & 3 deletions profiles/seccomp/default_linux.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build seccomp
// +build seccomp

package seccomp // import "github.com/docker/docker/profiles/seccomp"

import (
Expand Down
9 changes: 0 additions & 9 deletions profiles/seccomp/seccomp_unsupported.go

This file was deleted.

12 changes: 3 additions & 9 deletions project/PACKAGERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,8 @@ Please use our build script ("./hack/make.sh") for compilation.

### `DOCKER_BUILDTAGS`

If you're building a binary that might be used on platforms that include
seccomp, you will need to use the `seccomp` build tag:
```bash
export DOCKER_BUILDTAGS='seccomp'
```

There are build tags for disabling graphdrivers as well. By default, support
for all graphdrivers are built in.
There are build tags for disabling graphdrivers, if necessary. By default,
support for all graphdrivers are built in.

To disable btrfs:
```bash
Expand All @@ -107,7 +101,7 @@ export DOCKER_BUILDTAGS='exclude_graphdriver_aufs'

NOTE: if you need to set more than one build tag, space separate them:
```bash
export DOCKER_BUILDTAGS='apparmor exclude_graphdriver_aufs'
export DOCKER_BUILDTAGS='exclude_graphdriver_aufs exclude_graphdriver_btrfs'
```

## System Dependencies
Expand Down

0 comments on commit c9e19a2

Please sign in to comment.