https://gist.github.com/javahippie/efee5417c69aaad3baf297dd2cd71fc6 version: '3.3' services: go-ethereum: build: context: go-ethe/ ports: - "8545:8545" - "30303:30303" networks: - elk networks: elk: driver: bridge FROM ubuntu:xenial RUN apt-get update \ && apt-get install -y wget \ && rm -rf /var/lib/apt/lists/* WORKDIR "/opt" ARG BINARY="geth-linux-amd64-1.8.17-8bbe7207.tar.gz" RUN wget "https://gethstore.blob.core.windows.net/builds/$BINARY" RUN tar -xzvf $BINARY --strip 1 RUN rm $BINARY ADD ./genesis.json ./genesis.json RUN ./geth init genesis.json CMD nohup ./geth --dev --rpc --rpcaddr "0.0.0.0" --rpccorsdomain "*" --mine #geth --syncmode "light" --cache=2048 EXPOSE 8545 EXPOSE 30303

繼續閱讀

1、Get key Key Path c:\user\xxxooo\.docker\machine\machines\%%%%% xxxooo user %%%%% machine name id_rsa This is key 2、Need vm ip、id_rsa Get IP: 1. docker-machine ssh %%%%% 2. ifconfig If need PPK:winscp can auto change id_rsa to ppk 3、last step login VM account:docker =========== https://github.com/boot2docker/boot2docker Docker Machine auto logs in using the generated SSH key, but if you want to SSH into the machine manually (or you’re not using a Docker Machine managed VM), the credentials are:

繼續閱讀

Suggestion is use docker-machine for make docker machine is more easy. VirtualBox windows Use HFS.exe for copy file to docker machine instance. Directory < ethtest > ||=docker-compose.yml ||=< go-ether > &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp||=Dockerfile &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp||=start.sh &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp||=< genesis > &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp||=genesis.json 1、docker-compose.yml import: .keystore maybe no use, because run again docker-compose need to delete /go-ether/keystore .entrypoint must have together Dockerfile ENTRYPOINT ` version: '3.3' services: go-ether: build: context: go-ether/ volumes: #- ./go-ether/keystore:/root/.ethereum/devchain/keystore:rw - ./go-ether/genesis/genesis.json:/root/genesis/genesis.json:ro - /etc/localtime:/etc/localtime:ro entrypoint: /root/start.

繼續閱讀

https://yeasy.gitbooks.io/docker_practice/image/dockerfile/workdir.html WORKDIR 指定工作目录 格式为 WORKDIR <工作目录路径>。 使用 WORKDIR 指令可以来指定工作目录(或者称为当前目录),以后各层的当前目录就被改为指定的目录,如该目录不存在,WORKDIR会帮你建立目录。 之前提到一些初学者常犯的错误是把 Dockerfile 等同于 Shell 脚本来书写,这种错误的理解还可能会导致出现下面这样的错误:RUN cd /app RUN echo “hello” > world.txt 如果将这个 Dockerfile 进行构建镜像运行后,会发现找不到 /app/world.txt 文件,或者其内容不是 hello。原因其实很简单,在 Shell 中,连续两行是同一个进程执行环境,因此前一个命令修改的内存状态,会直接影响后一个命令;而在 Dockerfile 中,这两行 RUN 命令的执行环境根本不同,是两个完全不同的容器。这就是对 Dockerfile 构建分层存储的概念不了解所导致的错误。 之前说过每一个 RUN 都是启动一个容器、执行命令、然后提交存储层文件变更。第一层 RUN cd /app 的执行仅仅是当前进程的工作目录变更,一个内存上的变化而已,其结果不会造成任何文件变更。而到第二层的时候,启动的是一个全新的容器,跟第一层的容器更完全没关系,自然不可能继承前一层构建过程中的内存变化。 因此如果需要改变以后各层的工作目录的位置,那么应该使用 WORKDIR 指令。

繼續閱讀

p.p1 {margin: 0.0px 0.0px 2.0px 0.0px; font: 14.0px ‘Helvetica Neue’; color: #454545; min-height: 17.0px} p.p2 {margin: 0.0px 0.0px 2.0px 0.0px; font: 14.0px ‘Helvetica Neue’; color: #454545} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px ‘Helvetica Neue’; color: #454545; min-height: 15.0px} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px ‘Helvetica Neue’; color: #454545} p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px ‘Helvetica Neue’; color: #454545; min-height: 14.0px} span.s1 {font: 12.0px ‘.PingFang TC’} span.

繼續閱讀

作者的圖片

Sue boy

Sueboy Can support You

CIO

Taiwan