docker csf

https://meta.discourse.org/t/applying-docker-discourse-iptables-rules-when-using-csf-firewall/70531/5 csf v12.08 NOTE: This feature is currently in BETA testing, so may not work correctly This section provides the configuration of iptables rules to allow Docker containers to communicate through the host. If the generated rules do not work with your setup you will have to use a /etc/csf/csfpost.sh file and add your own iptables configuration instead 1 to enable, 0 to disable

2018-11-09 · 1 min · 64 words · Me

ethereum private chain by ubuntu

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

2018-11-08 · 1 min · 77 words · Me

docker-machine ssh login use putty or xshell or winscp

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: ...

2018-11-08 · 1 min · 77 words · Me

docker-compose ethereum geth private chain

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.sh ports: - "8545:8545" - "30303:30303" - "30303:30303/udp" networks: - elk networks: elk: driver: bridge ` 2、Dockerfile ...

2018-11-07 · 3 min · 590 words · Me

dockerfile RUN WORKDIR !!!!

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 指令。

2018-11-07 · 1 min · 45 words · Me