k8s

k8s pod Pod 是 Kubernetes 中可部署的最小、最基本对象。一个 Pod 代表集群中正在运行的单个进程实例。 Pod 包含一个或多个容器, 当 Pod 运行多个容器时,这些容器将作为一个实体进行管理并共用 Pod 的资源。 Pod 还包含其容器的共享网络和存储资源: 网络:系统会自动为 Pod 分配独一无二的 IP 地址。各 Pod 容器共用同一网络命名空间,包括 IP 地址和网络端口。Pod 中的各容器在 Pod 内通过 localhost 彼此通信。 存储:Pod 可以指定一组可在各容器之间共用的共享存储卷。 可以将 Pod 视为一个自成一体的独立“逻辑主机”,其中包含该 Pod 所服务于的应用的系统需求。 K8s Service Service 服务可以为一组具有相同功能的容器应用提供一个统一的入口地址。 Service 是 k8s 用来定义和管理网络访问 Pod 的一种资源对象。不同类型的 Service 决定了应用服务的暴露方式和访问范围。 Pod 在摧毁重建时ip地址是会动态变化的,这样通过客户端直接访问不合适了,这时候就可以选择使用服务来和 Pod 建立连接,通过标签选择器进行适配。这样就能有效的解决了Pod ip地址动态变换的问题了。 K8s Service有四种类型 ClusterIP (默认类型) 只在集群内部可访问,外部无法直接访问。 适合微服务之间的内部通信。 示例:type: ClusterIP NodePort 在每个节点(master node and worker node, all node)的指定端口开放服务,外部可以通过节点IP+端口访问服务。 一般用于开发、测试,或与外部负载均衡器配合使用。 示例:type: NodePort LoadBalancer Service 集成云服务商的负载均衡器(如 AWS ELB、GCP LB),自动分配一个外部 IP,通过该 IP 访问服务。 适合生产环境,需要公网访问的服务。 示例:type: LoadBalancer ExternalName 不真正暴露端口,而是把服务名解析为 DNS 名称(如外部数据库)。 适合集群内服务直接访问集群外部服务(如通过 DNS 访问外部资源)。 示例:type: ExternalName headless service 为什么需要无头服务? 客户端想要和指定的的 Pod 直接通信 并不是随机选择 开发人员希望自己控制负载均衡的策略,不使用 Service 提供的默认的负载均衡的功能,或者应用程序希望知道属于同组服务的其它实例。 Headless Service 使用场景 有状态应用,例如数据库 ...

2026-04-10 · 2 min · 410 words · -

Tekton 与 Kaniko:云原生 CI/CD 构建实践

Tekton 什么是 Tekton Tekton(发音:/ˈtɛktɒn/,“TEK-ton”)名称来自希腊语 τέκτων,意为"建造者"。 Tekton 是一个开源的云原生 CI/CD 框架,运行在 Kubernetes 上,通过 CRD(自定义资源定义)的方式定义流水线。它是强制 Kubernetes 原生的,所有流水线组件都以 Pod 方式运行,没有其他执行模式。 与 Jenkins、GitLab CI 等工具不同,Tekton 从设计之初就只能运行在 Kubernetes 上,而不是"可选支持 K8s"。这是架构层面的硬性约束,带来的好处是与 K8s 生态深度集成,代价是强依赖 K8s 环境。 Tekton 是 CD Foundation 旗下项目,前身是 Knative 的 Build 模块。 核心概念 Step(步骤) 流水线中的最小执行单元,对应容器中的一条命令。 Task(任务) 由一组有序的 Step 组成,运行在同一个 Pod 中,Steps 共享存储卷。 apiVersion: tekton.dev/v1 kind: Task metadata: name: build-and-push spec: params: - name: image type: string steps: - name: build image: gcr.io/kaniko-project/executor:latest args: - "--dockerfile=$(workspaces.source.path)/Dockerfile" - "--context=$(workspaces.source.path)" - "--destination=$(params.image)" workspaces: - name: source Pipeline(流水线) 由多个 Task 按顺序或并行组成,定义完整的 CI/CD 工作流。 ...

2026-03-25 · 3 min · 551 words · -

k8s command

k8s command commands kubekey https://github.com/kubesphere/kubekey Rancher https://rancher.com/ archlinux install k8s ubuntu install k8s commands # 查看某一个 pod 配置 kubectl get pod <pod-name> -n <namespace> -o yaml # 找到 Pod 所属的 Controller(通常是 Deployment) kubectl get pod <pod-name> -o jsonpath="{.metadata.ownerReferences[0].name}" # 查看 Deployment 的 YAML 启动命令 kubectl get deployment bgp-opt-backend -o yaml # exec api kubectl exec -it "$(kubectl get pods | grep -Eo '^[^ ]+' |grep api)" -- bash # pod kubectl get pod -A -o wide # 查看 pod, 比如能看到镜像版本 kubectl describe pods pod0 # configmap kubectl apply -f redis-config.yaml kubectl get configmap kubectl get configmap -n namespace0 kubectl edit configmap configmap0 kubectl delete configmap configmap0 # 显示集群信息 kubectl cluster-info kubectl cluster-info dump # 查询所有节点标签信息 kubectl get node -o wide --show-labels # kube-system namespace 的 pod kubectl get pods -n kube-system kubectl label node 192.168.0.212 gpu=true kubectl get node -L gpu kubectl get node -L kubernetes.io/arch # delete lable kubectl label node minikube disktype- kubectl describe node node0 ## 节点关机操作 ```bash # 1. 标记节点为不可调度(防止新 Pod 调度到该节点) kubectl cordon <node-name> # 2. 驱逐节点上的 Pod(优雅地将 Pod 迁移到其他节点) kubectl drain <node-name> --ignore-daemonsets --delete-emptydir-data # 3. 验证节点上是否还有 Pod 运行 kubectl get pods --all-namespaces -o wide | grep <node-name> # 4. 关机 sudo poweroff # 5. 节点重新上线后,恢复调度(取消不可调度状态) kubectl uncordon <node-name> 查看 pod 状态 kubectl get pods –all-namespaces ...

2026-03-10 · 16 min · 3198 words · -

nerdctl

nerdctl nerdctl 是 containerd 的命令行客户端工具,它提供了与 Docker CLI 兼容的用户体验。 什么是 nerdctl containerd 的 CLI 工具:nerdctl 全称是 “non-enterprise control”(或 containerd ctl) Docker 兼容:命令语法与 docker 命令高度兼容,降低学习成本 CNCF 项目:由 containerd 社区开发和维护 功能丰富:支持 Docker 不支持的一些高级功能 主要特性 1. Docker 兼容性 nerdctl 的命令与 docker 几乎完全兼容,可以无缝切换: # Docker 命令 docker run -d -p 80:80 nginx docker ps docker images docker build -t myapp . # nerdctl 命令(完全相同) nerdctl run -d -p 80:80 nginx nerdctl ps nerdctl images nerdctl build -t myapp . 2. 增强功能 nerdctl 支持一些 Docker 不支持的高级特性: ...

2025-12-18 · 6 min · 1227 words · -

containerd

containerd containerd: 2.2.0-1 runc: 1.4.0-1 nerdctl: 2.2.0-1 cni-plugins: 1.9.0-1 archlinux install containerd # archlinux install containerd pacman -S containerd runc nerdctl cni-plugins # containerd config sudo mkdir /etc/containerd containerd config default | sudo tee /etc/containerd/config.toml sudo systemctl daemon-reload sudo systemctl enable --now containerd # containerd 内存占用 47MB # containerd、runc、nerdctl 都是用户空间的程序, 不是内核模块,不需要重新加载内核, 不需要重启系统, 只需要运行守护进程即可, 安装完成就可以使用 sudo nerdctl pull hello-world sudo nerdctl run --rm hello-world # 如果需要编译镜像 sudo pacman -S buildkit sudo systemctl enable --now buildkit # build image, 需要在有 Dockerfile 的目录下运行 nerdctl build -t foo:v1.0.0 . sudo sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml sudo systemctl restart containerd ubuntu install containerd https://gist.github.com/Faheetah/4baf1e413691bc4e7784fad16d6275a9 https://www.techrepublic.com/article/install-containerd-ubuntu/ ...

2025-12-10 · 12 min · 2376 words · -

macos container

macos container Apple 官方的容器化工具,专为 Apple Silicon Mac 设计,使用轻量级虚拟机运行 Linux 容器。 系统要求 Apple Silicon Mac (M 系列芯片) macOS 26 或更高版本 Xcode (从 App Store 安装) 安装 # 使用 Homebrew Cask 安装 brew install --cask container # 启动 container 系统服务 container system start # 检查系统状态 container system status # 运行测试容器 container run --rm -it docker.io/library/hello-world:latest # 列出容器 (注意: 使用 ls 而不是 ps) container ls # 查看所有可用命令 container --help 从源码编译 git clone https://github.com/apple/container.git cd container swift build sudo cp .build/debug/container /usr/local/bin/container

2025-11-02 · 1 min · 78 words · -

podman basic

podman basic install https://podman.io/getting-started/installation # archlinux install podman pacman -S podman # 提示选择 crun, runc, 选 crun # netavark aardvark-dns 会默认安装 # 正常情况,安装 podman 之后不需要重启系统, 但是如果有异常,比如 CNI 之类 的问题,可以考虑重启一下... Netavark Netavark 是一个 用 rust 实现的 配置 linux 容器网络的工具。 In addition to the existing CNI Out of the stack, Podman Now it also supports based on Netavark and Aardvark New network stack. The new stack features improved support for containers in multiple networks 、 improvement IPv6 Support, And improve performance. To ensure that there is no impact on existing users, used CNI The stack will keep the default value of the existing installation, The new installation will use Netvark. ...

2023-04-06 · 6 min · 1127 words · -

docker registry

docker registry install registry # sample, https://docs.docker.com/registry/configuration/ cat > /usr/local/etc/docker-registry-config.yml << EOF version: 0.1 log: fields: service: registry storage: delete: enabled: true blobdescriptor: inmemory filesystem: rootdirectory: /var/lib/registry http: addr: :5000 headers: X-Content-Type-Options: [nosniff] health: storagedriver: enabled: true interval: 10s threshold: 3 EOF # https://hub.docker.com/_/registry # docker docker run -d \ --restart=always \ -v /usr/local/etc/docker-registry-config.yml:/etc/docker/registry/config.yml \ -p 5000:5000 \ --name docker-registry \ -v docker-registry:/var/lib/registry \ registry:2.8.3 # podman podman run -d \ -v /usr/local/etc/docker-registry-config.yml:/etc/docker/registry/config.yml \ -p 5000:5000 \ --name registry \ -v docker-registry:/var/lib/registry \ registry:2.8.3 buildah tag de3ebb1b260b registry.wiloon.com/pingd-proxy:v0.0.1 buildah push registry.wiloon.com/pingd-proxy:v0.0.1 podman pull registry.wiloon.com/pingd-proxy:v0.0.1 registry.wiloon.com/pingd-proxy registry.wiloon.com/ping-proxy docker 测试 sudo docker image tag hello-world registry.wiloon.com/myfirstimage sudo docker image ls sudo docker push registry.wiloon.com/myfirstimage sudo docker image rm hello-world sudo docker pull registry.wiloon.com/myfirstimage sudo docker image ls nginx config server { listen 443 ssl; server_name registry.wiloon.com; ssl_certificate /etc/letsencrypt/fullchain.pem; ssl_certificate_key /etc/letsencrypt/privkey.pem; ssl_protocols TLSv1.2; ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; client_max_body_size 0; chunked_transfer_encoding on; location /v2/ { if ($http_user_agent ~ "^(docker/1.(3|4|5(?!.[0-9]-dev))|Go ).*$" ) { return 404; } proxy_pass http://192.168.50.13:5000; proxy_set_header Host $http_host; # required for docker client's sake proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 900; } } 查看仓库镜像 # 镜像列表 curl https://registry.wiloon.com/v2/_catalog | jq . # 查询镜像 tag(版本) curl https://registry.wiloon.com/v2/rssx-api/tags/list 删除镜像与空间回收 podman inspect rssx-api|grep sha256 curl -I -X DELETE https://registry.wiloon.com/v2/rssx-api/manifests/sha256:5b367dbc03f141bb5246b0dff6d5fc9c83d8b8d363d0962f3b7d344340e458f6 https://zhuanlan.zhihu.com/p/33324217 ...

2022-10-10 · 2 min · 240 words · -

aws

aws 查看所有区域的资源: ec2>左侧菜单> AWS Global View aws s3 ls s3://obsidian-w10n aws configure aws s3 cp foobar s3://obsidian-w10n https://aws.amazon.com/cli/ SAA, Solution Architect Ass

2020-05-10 · 1 min · 22 words · W10N

docker 网络

docker 网络 安装 Docker 时,它会自动创建 3 个网络。可以使用 docker network ls 命令列出这些网络。 $ docker network ls NETWORK ID NAME DRIVER 7fca4eb8c647 bridge bridge 9f904ee27bf5 none null cf03ee007fb4 host host 运行一个容器时,可以使用 the -net 标志指定您希望在哪个网络上运行该容器。 bridge 网络表示所有 Docker 安装中都存在的 docker0 网络。除非使用 docker run -net=选项另行指定,否则 Docker 守护进程默认情况下会将容器连接到此网络。在主机上使用 ifconfig命令,可以看到此网桥是主机的网络堆栈的一部分。 none 网络在一个特定于容器的网络堆栈上添加了一个容器。该容器缺少网络接口。 host 网络在主机网络堆栈上添加一个容器。您可以发现,容器中的网络配置与主机相同。 用户定义的网络 您可以创建自己的用户定义网络来更好地隔离容器。Docker 提供了一些默认网络驱动程序来创建这些网络。您可以创建一个新 bridge 网络或覆盖一个网络。也可以创建一个网络插件或远程网络并写入您自己的规范中。 您可以创建多个网络。可以将容器添加到多个网络。容器仅能在网络内通信,不能跨网络进行通信。一个连接到两个网络的容器可与每个网络中的成员容器进行通信。当一个容器连接到多个网络时,外部连接通过第一个 (按词典顺序) 非内部网络提供。

2020-04-19 · 1 min · 56 words · -

docker save 与 docker export 的区别, docker 镜像 导出

docker save 与 docker export, docker 镜像 导出 导出 # save & load docker save f1905dce9659 > kafka.tar # 另外一种 save 语法 docker save -o images.tar postgres:9.6 # 从 tar 包加载镜像而不是 stdin, --input, -i: 指定导入的文件,代替 STDIN。 docker load -i foo.tar docker load < kafka.tar # docker load 之后 repository 和 tag 都是 none, 重新打一下 tag docker tag f1905dce9659 wurstmeister/kafka:latest # export & import docker export f299f501774c > hangger_server.tar docker import - new_hangger_server < hangger_server.tar docker save 和 docker export 的区别: docker save 保存的是镜像 (image) ,docker export 保存的是容器 (container) ; docker load 用来载入镜像包,docker import 用来载入容器包,但两者都会恢复为镜像; docker load 不能对载入的镜像重命名,而 docker import 可以为镜像指定新名称。 ...

2020-04-13 · 1 min · 102 words · -

nexus docker repo

nexus 配置太复杂 用 https://hub.docker.com/_/registry 作为 docker registry wiloon.com/docker/registry docker hosted repo create repository select recipe: docker (hosted) name: docker-repo-0 HTTP: 5001, 仓库单独的访问端口(例如:5001) allow anonymous: yes Docker Registry API Support> Enable Docker V1 API> Allow clients to use the V1 API to interact with this repository: yes Hosted> Deployment policy: Allow redeploy nexus docker proxy Name: dockerhub-proxy Remote storage 配置成 https://registry-1.docker.io Docker Index 选择 Use Docker Hub 保存 创建一个 Docker Group Repository 勾选 : HTTP, Create an HTTP connector at specified port. Normally used if the server is behind a secure proxy 并填写端口 8083 ...

2020-03-14 · 1 min · 139 words · -

buildah

buildah # removes all dangling images, same as docker prune podman image prune # remove image buildah rmi 0d2d0133941b sudo pacman -S fuse-overlayfs sudo pacman -S buildah # login buildah login container.wiloon.com buildah login --tls-verify=false container.wiloon.com # buildah needs to run as root!!! # list all the images buildah images # build ### buildah bud -f Dockerfile -t <tag0> . buildah bud -f Dockerfile -t fedora-httpd . buildah push registry.wiloon.com/pingd-proxy:v0.0.1 # list all containers buildah containers buildah run <container name> buildah run $container -- dnf -y install java buildah rm $newcontainer buildah push fedora-bashecho docker-daemon:fedora-bashecho:latest container0=$(buildah from timer0) buildah run $container0 http: server gave HTTP response to HTTPS client https://github.com/containers/buildah/issues/4788 ...

2020-01-20 · 1 min · 114 words · -

docker btrfs

docker btrfs 镜像分层与Btrfs共享 Docker利用Btrfs subvolumes和快照来管理镜像和容器数据层的硬盘组件(on-disk components)。Btrfs subvolumes看起来像一个正常的Unix文件系统。因此,他们可以有自己的内部目录结构,挂钩到更广泛的Unix文件系统。 subvolumes更新文件时涉及写时拷贝操作,写入新文件时涉及从一个底层存储池来按需分配空间的操作。它们既能嵌套也能做快照。下图显示了4个subvolumes。“subvolume 2″和"subvloume 3″是嵌套的,而"subvolume 4"显示它自己的内部目录树。 使用btrfs驱动的Docker主机创建镜像和容器的过程如下: 1.镜像的基础数据层存储在/var/lib/docker/btrfs/subvolumes的Btrfs subvloume中。 2.后续的镜像数据层存储为subvolume或快照的父级数据层的一个Btrfs快照中。 https://www.centos.bz/2016/12/docker-and-btrfs-in-practice/

2019-04-14 · 1 min · 16 words · -

go > docker

‘go > docker’ gOOS=linux GOARCH=arm go build . docker build -t registry.wiloon.com/nj4xx-data:v0.1.0 . docker push registry.wiloon.com/nj4xx-data:v0.1.0 docker pull registry.wiloon.com/nj4xx-data:v0.1.0

2019-03-28 · 1 min · 19 words · -

telegraf

telegraf # archlinux, telegraf yay -S telegraf-bin ubuntu && debian # influxdata-archive_compat.key GPG fingerprint: # 9D53 9D90 D332 8DC7 D6C8 D3B9 D8FF 8E1F 7DF8 B07E wget -q https://repos.influxdata.com/influxdata-archive_compat.key echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list sudo apt-get update && sudo apt-get install telegraf binary https://portal.influxdata.com/downloads/ vim /etc/telegraf/telegraf.conf [global_tags] [agent] interval = "10s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 10000 collection_jitter = "0s" flush_interval = "10s" flush_jitter = "0s" precision = "" # 修改主机名 hostname = "foo" omit_hostname = false [[outputs.influxdb]] urls = ["http://influxdb.wiloon.com:32086"] # 注意修改 database database = "monitor" [[inputs.cpu]] percpu = true totalcpu = true collect_cpu_time = false report_active = false [[inputs.disk]] ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"] [[inputs.diskio]] [[inputs.kernel]] [[inputs.mem]] [[inputs.processes]] [[inputs.swap]] [[inputs.system]] [[inputs.net]] [[inputs.netstat]] [[inputs.linux_sysctl_fs]] inputs.linux_sysctl_fs https://www.kernel.org/doc/Documentation/sysctl/fs.txt ...

2019-02-16 · 3 min · 553 words · -

aliyun oss, 对象存储, ossutil

aliyun oss, 对象存储, ossutil aliyun oss, ossutil install ossutil sudo -v ; curl https://gosspublic.alicdn.com/ossutil/install.sh | sudo bash # 生成配置文件, stsToken 可以置空 ossutil config ./ossutil cp a -f oss://my-bucket/path ./ossutil64 cp /root/tmp/wordpress.sql -f oss://wiloon-backup/ https://help.aliyun.com/document_detail/50561.html?spm=a2c4g.11186623.6.1283.2e0655b7qtA1Md https://help.aliyun.com/document_detail/120075.html

2019-01-30 · 1 min · 35 words · -

owncloud,cozy, nextcloud, Cloudreve

owncloud,cozy, nextcloud, Cloudreve Cloudreve ☁️ 支持本机、从机、七牛、阿里云 OSS、腾讯云 COS、又拍云、OneDrive (包括世纪互联版) 作为存储端 📤 上传/下载 支持客户端直传,支持下载限速 💾 可对接 Aria2 离线下载,可使用多个从机节点分担下载任务 📚 在线 压缩/解压缩、多文件打包下载 💻 覆盖全部存储策略的 WebDAV 协议支持 ⚡ 拖拽上传、目录上传、流式上传处理 🗃️ 文件拖拽管理 👩‍👧‍👦 多用户、用户组 🔗 创建文件、目录的分享链接,可设定自动过期 👁️‍🗨️ 视频、图像、音频、文本、Office 文档在线预览 🎨 自定义配色、黑暗模式、PWA 应用、全站单页应用 🚀 All-In-One 打包,开箱即用 Gofi https://gofi.calmlyfish.com/zh/ nohup ./gofi-linux-amd64 & podman run -d --name=gofi -p 80:8080 -v gofi-app:/app sloaix/gofi:latest owncloud podman pull owncloud/ocis podman run –rm -ti -p 9200:9200 -e OCIS_INSECURE=true owncloud/ocis Cozy Cloud Cozy Cloud是一个开源的个人私有云,可以用于阅读电子邮件,或者管理和同步联系人、文件或日历,同时会有相关的应用商店和社区作为素材库,它可以将所有Web服务都放在同一个私有的个人平台,通过此平台,用户的网页应用和设备可以轻松地进行数据分享。 ...

2019-01-26 · 1 min · 137 words · -

Containerfile

Containerfile, Dockerfile buildkit 默认会查找当前目录的 Containerfile 或者 Dockerfile FROM golang:1.22.0 AS build ENV GO111MODULE on ARG APP_NAME=rssx-api WORKDIR /workdir COPY . . RUN CGO_ENABLED=0 GOOS=linux GOPROXY=https://goproxy.io go build -a -o ${APP_NAME} main.go FROM alpine:3.19.1 AS prod ARG APP_NAME=rssx-api COPY --from=build /workdir/${APP_NAME} /data/${APP_NAME} COPY config.toml config.toml COPY config.toml /data/config.toml ENV APPLICATION_NAME ${APP_NAME} CMD "/usr/local/bin/${APPLICATION_NAME}" FROM golang:1.12.4 AS build ENV GO111MODULE on WORKDIR /go/src/xxx.com/xxx ADD . . ADD cmd cmd ADD internal internal ADD pkg pkg RUN CGO_ENABLED=0 GOOS=linux go build -a cmd/xxx.go FROM alpine AS prod COPY --from=build /go/src/xxx.com/xxx/xxx . # dev ADD configs/xxx.json . CMD ["./xxx"] buildah -f Dockerfile-0 --build-arg foo="bar" 环境变量 设置环境变量 USERNAME 默认值为 admin,后面可以通过docker run -e USERNAME=“XXXXXX"修改,这个环境变量在容器里也可以$USERNAME获取 ...

2018-12-22 · 3 min · 588 words · -

docker install

docker install ubuntu # apt 从仓库里安装, 落后两个小版本, 也算比较新了, 建议从官方源安装 sudo apt install docker.io curl, 配置官方源, 一般会高几个小版本 https://docs.docker.com/engine/install/ubuntu/ # 删掉旧版本的包, 有冲突的包 for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl gnupg sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo docker run hello-world https://docs.docker.com/install/linux/docker-ce/centos/ ...

2018-11-28 · 1 min · 194 words · -