https://medium.com/taipei-ethereum-meetup/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E7%A7%81%E7%B6%B2%E5%BB%BA%E7%AB%8B-%E4%B8%80-43f8677fc9f8 如果要組成一個私人網路,同樣按照上面的流程建立其他節點。如果沒有下–nodiscover參數的話,最後節點應該會找到彼此。如果有下的話就必須用手動的方式加入其他節點,加入的方式有三種: 一是在geth指令加入–bootnodes參數; 二是進到console裡使用 admin.addPeer(); 三是存成static-nodes.json檔,讓geth自動連線。 不管是使用哪一種,我們都要先知道要連到 static-nodes.json 裡面使用domain,可能會有問題,要自行更換ip Example: geth --data ~/data cp static-nodes.json ~/data/geth/static-nodes.json static-nodes.json like this [ "enode://53999cc519079c5190798b1114bd16a05a8d5190796cc51907988a4e80ebda7b6c519079e56b0b161da3475c4dc62f6b51907967a6e327e46aa56329c519079f@192.168.0.10:30303" ]

繼續閱讀

Alpine image apk update fetch hangs At apk –no-cache upgrade or RUN apk update no respone Try to login docker container run command line: wget http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz Get status is “stalled”. PS:Error is different “no respone” or “hang” Way one: Answer: apk fetch hangs https://github.com/gliderlabs/docker-alpine/issues/307 10G mtu or switch mtu So Into directory docker build --network host . Way two: Answer: https://mlohr.com/docker-mtu/ https://medium.com/@sylwit/how-we-spent-a-full-day-figuring-out-a-mtu-issue-with-docker-4d81fdfe2caf nano /etc/docker/daemon.json { "mtu": 1450 }

繼續閱讀

https://stackoverflow.com/questions/48736212/bad-file-descriptor-error-during-apk-update-in-docker-container-why When you login docker container, use apk update get this error message Bad file descriptor… Try to run follow command rm -rf /var/cache/apk && \ mkdir /var/cache/apk && \ apk update

繼續閱讀

F……………………………………………………………………………….. https://www.preining.info/blog/2018/05/docker-cron-mail-and-logs/ from debian:stretch-slim RUN apt-get -y update RUN apt-get install -y cron #ssmtp ADD . /app ADD crontab /etc/cron.d/mypackage RUN chmod 0644 /etc/cron.d/mypackage #ADD ssmtp.conf /etc/ssmtp/ssmtp.conf #RUN chown root.mail /etc/ssmtp/ssmtp.conf #RUN chmod 0640 /etc/ssmtp/ssmtp.conf CMD cron -f ===== docker-compose.yml version: '3.3' services: gethpeers: build: context: gethpeers/ volumes: - cronlog:/app/cronapplog:rw networks: - fastdev fakelog: build: context: fakelog/ volumes: - cronlog:/app/cronapplog:rw - filebeat:/usr/share/filebeat/data:rw networks: - fastdev volumes: cronlog: filebeat: networks: fastdev: driver: bridge gethpeers Dockerfile from debian:stretch-slim RUN apt-get -y update RUN apt-get install -y cron #ssmtp ADD .

繼續閱讀

https://www.reddit.com/r/docker/comments/9j2vc7/migrating_to_kubernetes_from_dockercompose_in/ If / when you’re able to spawn arbitrary VMs, you can look at kubeadm, CoreOS, RKE (my current choice), and so on for cluster creation. Before you can use kompose, or use kubectl apply -f myawesome.yaml, you first and foremost need to set up a Kubernetes cluster. This might be the most challenging thing to do because Kubernetes is heavy-weight compared to docker-compose. I recommend using RKE to set it up.

繼續閱讀

YAML multi-line string

https://rancher.com/docs/rke/v0.1.x/en/config-options/add-ons/user-defined-add-ons/ To define an add-on directly in the YAML file, make sure to use the YAML’s block indicator |- as the addons directive is a multi-line string option. It’s possible to specify multiple YAML resource definitions by separating them using the -– directive.

繼續閱讀

作者的圖片

Sue boy

Sueboy Can support You

CIO

Taiwan