Skip to content

Commit 8454f65

Browse files
authored
[BREAKING CHANGE] seccomp_profile is no longer configurable (#53)
Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
1 parent e41a8ef commit 8454f65

File tree

4 files changed

+7
-22
lines changed

4 files changed

+7
-22
lines changed

cmd/yukid/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ repo_config_dir = ["/path/to/config-dir"]
8888
## 如果为 0 的话则不会超时。注意修改的配置仅对新启动的同步容器生效
8989
## 默认值为 0
9090
#sync_timeout = "48h"
91-
92-
## 修改同步时的 seccomp profile,用于特殊用途的容器
93-
## 例如,使用 seccomp user notify 的程序需要放行一些相关的系统调用
94-
## 留空时使用 docker daemon 默认的 seccomp 配置
95-
## 默认值为空
96-
#seccomp_profile = "/path/to/seccomp/profile.json"
9791
```
9892

9993
### Repo Configuration

pkg/docker/cli.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ type RunContainerConfig struct {
2626
Name string
2727

2828
// HostConfig
29-
SecurityOpt []string
30-
Binds []string
29+
Binds []string
3130

3231
// NetworkingConfig
3332
Network string
@@ -80,8 +79,7 @@ func (c *clientImpl) RunContainer(ctx context.Context, config RunContainerConfig
8079
}
8180

8281
cfg.Spec.HostConfig = containerapi.HostConfig{
83-
Binds: config.Binds,
84-
SecurityOpt: config.SecurityOpt,
82+
Binds: config.Binds,
8583
}
8684
cfg.Spec.HostConfig.Mounts = []mount.Mount{
8785
{

pkg/server/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ type Config struct {
2222
PostSync []string `mapstructure:"post_sync"`
2323
ImagesUpgradeInterval time.Duration `mapstructure:"images_upgrade_interval" validate:"min=0"`
2424
SyncTimeout time.Duration `mapstructure:"sync_timeout" validate:"min=0"`
25-
SeccompProfile string `mapstructure:"seccomp_profile" validate:"omitempty,filepath"`
2625
}
2726

2827
var DefaultConfig = Config{

pkg/server/utils.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,6 @@ func (s *Server) syncRepo(ctx context.Context, name string, debug bool) error {
386386
repo.User = s.config.Owner
387387
}
388388

389-
var securityOpt []string
390-
if len(s.config.SeccompProfile) > 0 {
391-
securityOpt = append(securityOpt, "seccomp="+s.config.SeccompProfile)
392-
}
393-
394389
envMap := repo.Envs
395390
if len(envMap) == 0 {
396391
envMap = make(map[string]string)
@@ -425,12 +420,11 @@ func (s *Server) syncRepo(ctx context.Context, name string, debug bool) error {
425420
api.LabelRepoName: repo.Name,
426421
api.LabelStorageDir: repo.StorageDir,
427422
},
428-
Env: envs,
429-
Image: repo.Image,
430-
Name: ctName,
431-
SecurityOpt: securityOpt,
432-
Binds: binds,
433-
Network: repo.Network,
423+
Env: envs,
424+
Image: repo.Image,
425+
Name: ctName,
426+
Binds: binds,
427+
Network: repo.Network,
434428
},
435429
)
436430
if err != nil {

0 commit comments

Comments
 (0)