fork 后本地仓库添加,这里例如 skopeo
- 先添加上游
git remote add upstream https://github.com/containers/skopeo.git
- 拉取上游
// client.go | |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/rpc" | |
"net/rpc/jsonrpc" | |
"github.com/gorilla/websocket" |
# https://github.com/jinwyp/one_click_script/blob/master/install_kernel.sh | |
# https://vault.centos.org/altarch/7.8.2003/kernel/x86_64/Packages/ | |
altarch_kernel_name="kernel" | |
altarch_kernel_version="4.19.113-300" | |
altarchDownloadUrl="https://vault.centos.org/altarch/7.8.2003/kernel/x86_64/Packages" | |
wget ${altarchDownloadUrl}/${altarch_kernel_name}-${altarch_kernel_version}.el7.x86_64.rpm | |
wget ${altarchDownloadUrl}/${altarch_kernel_name}-core-${altarch_kernel_version}.el7.x86_64.rpm | |
wget ${altarchDownloadUrl}/${altarch_kernel_name}-devel-${altarch_kernel_version}.el7.x86_64.rpm | |
wget ${altarchDownloadUrl}/${altarch_kernel_name}-headers-${altarch_kernel_version}.el7.x86_64.rpm |
// You can edit this code! | |
// Click here and start typing. | |
package main | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) |
fork 后本地仓库添加,这里例如 skopeo
git remote add upstream https://github.com/containers/skopeo.git
import json,base64 | |
import requests, re | |
from collections import Counter | |
class DockerRegistryClient(object): | |
def __init__(self, registry="http://reg.xxx.xxx:5000", auth='xxx:xxxxx', api_timeout=None): | |
self.registry = registry | |
self.auth = auth | |
self.method_kwargs = {} | |
self.scheme = 'application/vnd.docker.distribution.manifest.v2+json' |
离线环境来从现场获取docker的pprof信息步骤
获取go的镜像
while read img;
do docker run --rm --entrypoint go $img version 2>/dev/null | grep -qw version && { echo $img;break; };
done < <(docker images --format '{{.Repository}}:{{.Tag}}')
``` | |
wget https://github.com/multiarch/qemu-user-static/releases/download/v3.0.0/qemu-x86_64-static.tar.gz | |
docker run --privileged -ti --rm --name flannel --net host -e GOARCH=amd64 \ | |
--cap-add=NET_ADMIN --cap-add=SYS_ADMIN \ | |
-u $( id -u):$( id -g) \ | |
-v $PWD/dist/qemu-amd64-static:/usr/bin/qemu-amd64-static \ | |
-v $PWD:/go/src/github.com/coreos/flannel:ro \ | |
-v $PWD/dist:/go/src/github.com/coreos/flannel/dist \ | |
-v /run:/run \ | |
--workdir=/go/src/github.com/coreos/flannel \ |
# 取无法拉取镜像名 | |
kubectl get po `kubectl get pod -o wide | grep Image | awk '{print $1}'` -o yaml | grep -Po 'image: \K\S+' | sort -u | |
# docker save -o images.tar.gz \ | |
imgList="" | |
while read img;do | |
if docker inspect $img &>/dev/null;then | |
imgList+="$imgList $img" | |
fi |
#!/bin/bash | |
# dnsConfig | |
kubectl -n kafka patch deployments kafka-0 -p '{"spec":{"template":{"spec":{"dnsConfig":{"options":[{"name":"single-request-reopen"}]}}}}}' | |
# dnsOptions | |
kubectl patch deploy $name \ | |
-p '{"spec":{"template":{"spec":{"dnsConfig":{"options":[{"name":"single-request-reopen"}]}}}}}' | |
function t(){ |
scripts/build/.variables 文件去掉-w | |
scripts/build/binary 增加 -gcflags="all=-trimpath=$PWD -N -l" | |
构建 make -f docker.Makefile binary |