github.com/containerd/nerdctl@v1.7.7/Dockerfile.d/test-integration-buildkit-nerdctl-test.service (about)

     1  # Copyright The containerd Authors.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  # Copied from released buildkit.service
    16  
    17  [Unit]
    18  After=network.target local-fs.target
    19  Description=buildkit daemon for integration test (namespace: nerdctl-test)
    20  
    21  [Service]
    22  ExecStartPre=-/sbin/modprobe overlay
    23  ExecStart=/usr/local/bin/buildkitd --oci-worker=false --containerd-worker=true --addr="unix:///run/buildkit-nerdctl-test/buildkitd.sock" --root=/var/lib/buildkit-nerdctl-test --containerd-worker-namespace=nerdctl-test
    24  
    25  Type=notify
    26  Delegate=yes
    27  KillMode=process
    28  Restart=always
    29  RestartSec=5
    30  # Having non-zero Limit*s causes performance problems due to accounting overhead
    31  # in the kernel. We recommend using cgroups to do container-local accounting.
    32  LimitNPROC=infinity
    33  LimitCORE=infinity
    34  LimitNOFILE=infinity
    35  # Comment TasksMax if your systemd version does not supports it.
    36  # Only systemd 226 and above support this version.
    37  TasksMax=infinity
    38  OOMScoreAdjust=-999
    39  
    40  [Install]
    41  WantedBy=docker-entrypoint.target