# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/docker-proxy
profile docker-proxy /{,usr/}{,s}bin/docker-proxy flags=(complain) {
  include <abstractions/base>

  capability net_admin,
  capability net_bind_service,

  network inet stream,
  network inet6 stream,

  signal (receive) set=int peer=dockerd,

  @{exec_path} mr,

  @{sys}/kernel/mm/transparent_hugepage/hpage_pmd_size r,
  
  @{PROC}/sys/net/core/somaxconn r,

  include if exists <local/docker-proxy>
}