• 安装containerd


    root@ubuntu:~/kata# go get github.com/containerd/containerd
    root@ubuntu:~/kata# pt-get install btrfs-tools
    
    Command 'pt-get' not found, did you mean:
    
      command 'apt-get' from deb apt
    
    Try: apt install <deb name>
    
    root@ubuntu:~/kata# apt-get install btrfs-toolas
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package btrfs-toolas
    root@ubuntu:~/kata# apt-get install btrfs-progs libbtrfs-dev
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package libbtrfs-dev
    root@ubuntu:~/kata# apt-get install btrfs-progs
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    btrfs-progs is already the newest version (4.15.1-1build1).
    The following packages were automatically installed and are no longer required:
      golang-1.10-go golang-1.10-src golang-src
    Use 'sudo apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 160 not upgraded.
    root@ubuntu:~/kata# cd $GOPATH/src/github.com/containerd/containerd
    root@ubuntu:/opt/gopath/src/github.com/containerd/containerd# make
    + bin/ctr
    + bin/containerd
    + bin/containerd-stress
    + bin/containerd-shim
    + bin/containerd-shim-runc-v1
    + bin/containerd-shim-runc-v2
    + binaries
    root@ubuntu:/opt/gopath/src/github.com/containerd/containerd# make install
    + install bin/ctr bin/containerd bin/containerd-stress bin/containerd-shim bin/containerd-shim-runc-v1 bin/containerd-shim-runc-v2
    root@ubuntu:/opt/gopath/src/github.com/containerd/containerd# whereis containerd
    containerd: /usr/local/bin/containerd
    root@ubuntu:/opt/gopath/src/github.com/containerd/containerd# /usr/local/bin/containerd -version
    containerd github.com/containerd/containerd v1.4.0-113-g4a6b47d4 4a6b47d470d9f2dfc3d49f2819b968861dfa123e
    root@ubuntu:/opt/gopath/src/github.com/containerd/containerd# 
    mkdir -p /etc/containerd
    cp  ~/container.toml /etc/containerd
    containerd config default > /etc/containerd/config.toml
    systemctl restart containerd
    
    touch /etc/systemd/system/containerd.service
    # Copyright The containerd Authors.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    [Unit]
    Description=containerd container runtime
    Documentation=https://containerd.io
    After=network.target local-fs.target
    
    [Service]
    ExecStartPre=-/sbin/modprobe overlay
    ExecStart=/usr/local/bin/containerd
    
    Type=notify
    Delegate=yes
    KillMode=process
    Restart=always
    RestartSec=5
    # Having non-zero Limit*s causes performance problems due to accounting overhead
    # in the kernel. We recommend using cgroups to do container-local accounting.
    LimitNPROC=infinity
    LimitCORE=infinity
    LimitNOFILE=infinity
    # Comment TasksMax if your systemd version does not supports it.
    # Only systemd 226 and above support this version.
    TasksMax=infinity
    OOMScoreAdjust=-999
    
    [Install]
    WantedBy=multi-user.target
  • 相关阅读:
    强烈推荐好用的文本编辑器Notepad++
    MSP430学习笔记9PS2键盘解码
    MSP430学习笔记8ST7920 12864液晶显示并行接口
    MSP430学习笔记74*4键盘的对应数码管显示
    MSP430学习笔记6动态数码管的显示
    MSP430寄存器中文注释
    MSP430学习小结3MSP430基本时钟模块
    ST7920 12864液晶图片取模,显示你想显示的图片。
    MSP430学习小结2程序主体结构安排及低功耗转载
    Windows Phone开发之路(4) XAML基础(上)
  • 原文地址:https://www.cnblogs.com/dream397/p/13822760.html
Copyright © 2020-2023  润新知