https://blog.csdn.net/u011166225/article/details/84940228
对于个人开发者来说,在一定情况下很好用。但是对于构建管理项目或者提供构建流程管理的Devops项目而言却是个灾难–本地存储结构不能对用户开放,它们也不能干扰用户本身的构建流程。所幸的是,Moby umbrella的开发团队注意到了这一点,他们希望通过重构存储管理和容器快照来解决一部分问题,于是BuildKit诞生了。
-——————–
作者:狗蛋丶
来源:CSDN
原文:https://blog.csdn.net/u011166225/article/details/84940228
版权声明:本文为博主原创文章,转载请附上博文链接!
http://dockone.io/question/1516
巨坑!
Centos7默认xfs文件系统与docker默认overlay2存储驱动不匹配,会导致容器内文件无法删除等问题
https://blog.csdn.net/weixin_41826563/article/details/80549323
wx65251206
再次遇到这个问题,终于还是发扬刨根问题的精神,经过一上午的百度,google,bing
终于找到根本原因。
这里记录一下,为了帮助后面的人,同时也提醒自己。
问题原因与docker无关,在于linux内核版本。
测试有问题的内核版本是Red Hat 4.8.3-9—对应的发行版是CentOS7.2
dpsrm < pattern docker cantainer name >
#!/bin/sh IFS=$'\n' echo $1 docker ps -a --no-trunc | grep $1 | awk '{print $1}' | xargs -r --no-run-if-empty docker stop docker ps -a --no-trunc | grep $1 | awk '{print $1}' | xargs -r --no-run-if-empty docker rm docker rmi -f $(docker images | grep $1 | awk '{print $3}')
https://gist.github.com/garystafford/f0bd5f696399d4d7df0f
docker exec -it $(docker container ls | grep 'pattern' | awk '{print $1}') bin/bash docker ps -a --no-trunc | grep 'pattern' | awk '{print $1}' | xargs -r --no-run-if-empty docker rm docker images -a | grep 'pattern' | awk '{print $3}' | xargs docker rmi ############################################################################### # Helpful Docker commands and code snippets ############################################################################### ### CONTAINERS ### docker stop $(docker ps -a -q) #stop ALL containers docker rm -f $(docker ps -a -q) # remove ALL containers docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter # exec into container docker exec -it $(docker container ls | grep '' | awk '{print $1}') sh # exec into container on windows with Git Bash winpty docker exec -it $(docker container ls | grep '' | awk '{print $1}') sh # helps with error: 'unexpected end of JSON input' docker rm -f $(docker ps -a -q) # Remove all in one command with --force docker exec -i -t "container_name_here" /bin/bash # Go to container command line # to exit above use 'ctrl p', 'ctrl q' (don't exit or it will be in exited state) docker rm $(docker ps -q -f status=exited) # remove all exited containers ### IMAGES ### # list images and containers docker images | grep "search_term_here" # remove image(s) (must remove associated containers first) docker rmi -f image_id_here # remove image(s) docker rmi -f $(docker images -q) # remove ALL images!
https://medium.com/taipei-ethereum-meetup/%E4%BD%BF%E7%94%A8-go-ethereum-1-6-clique-poa-consensus-%E5%BB%BA%E7%AB%8B-private-chain-1-4d359f28feff
node 1
node 2
signer 1
signer 2
all private key & address create by https://vanity-eth.tk/
check again private key & address by https://www.myetherwallet.com/#view-wallet-info
node1
private key:138cbbfb21686ddc3b5ffeb2cfc83491175af68319977acb81d0ae93392c626c
account address:e79d33e93bd888b35e055f1a12d876354729037b
node2
private key:df0c39faccd3c9d6d10091932f2214b9d42e92bd07b64a1552d13d39a6a84122
account address:Bf95EAacf10BEA53f0a73955a7eFCE2fb4A4Ef1d
signer1
nodekeyhex:fcc406a7344690f66c757cc2c9987e3e78bb01e33229f9877d48a7fecc2d6657
node address:256330933851d6d3c5f7326b01021553415a33cd5485e23bfbe35f6321e6e2f8373bb1c94933fdb3283a1a8b2b737587dd99c555029e65e173a3094daa39277c
private key:d05bd152f3d71ff5f91830f3ccc1090fb670c7026ebf8c2136d4e5090d59398d
account address:5921a4C1B13afbD4b61d63e9c7BD47741C47B176
signer2
private key:df504d175ae63abf209bad9dda965310d99559620550e74521a6798a41215f46
account address:8Cc5A1a0802DB41DB826C2FcB72423744338DcB0
docker-compose
version: '3.3' services: go-ethereum-node1: build: context: go-ethereum-node1/ volumes: #- ./go-ethereum/keystore:/root/.ethereum/devchain/keystore:rw - ./go-ethereum-node1/genesis/poa_for_dev.json:/root/genesis/poa_for_dev.json:ro - /etc/localtime:/etc/localtime:ro #- ./go-ethereum/log:/root/log:rw entrypoint: /root/start.sh ports: - "18545:8545" - "30313:30303" - "30313:30303/udp" networks: - fastdev go-ethereum-node2: build: context: go-ethereum-node2/ volumes: - .
docker-compose.yml
version: '3.3' services: ethereum_etl: build: context: . volumes: - ./var/log/:/ethereum-etl/output:rw #- /root/go/src/github.com/ethereum/go-ethereum/build/bin/data:/ethereum-etl/ipc #failed ipc is interface not data networks: - etl networks: etl: driver: bridge DOCKERFILE
FROM python:3.6-alpine MAINTAINER Eric Lim ENV PROJECT_DIR=ethereum-etl RUN mkdir /$PROJECT_DIR WORKDIR /$PROJECT_DIR RUN apk add --no-cache gcc musl-dev #for C libraries: RUN pip install --upgrade pip && pip install ethereum-etl #ENTRYPOINT ["python", "ethereumetl"] ENTRYPOINT ["ethereumetl"] CMD ["export_all", "-s", "0", "-e", "500000", "-p", "http://xxx.
http://sueboy.blogspot.com/2018/11/docker-iptables_12.html
sudo iptables -vnL
======NAT=====
sudo iptables -t nat -vnL
顯示行數
sudo iptables -t nat -L POSTROUTING -n –line-numbers
-D 刪除那行
sudo iptables -t nat -D POSTROUTING x x is which line delete
確認docker網段補上
sudo iptables -t nat -A POSTROUTING -s 172.19.0.0/16 ! -o docker0 -j MASQUERADE