Docker: tendermint container not work - docker

My OS is Windows 10 and docker version 17.12.0-ce, build c97c6d6.
Here is my plan:
0. Get containers
docker pull tendermint/tendermint
docker pull tendermint/monitor
1. Init container
docker run --rm -p 46657:46657 --name tendermint_bc -v "C:/Users/user/sandbox/tendermind/tmdata:/tendermint" tendermint/tendermint init
2. Start container
docker run --rm -d -v "C:/Users/user/sandbox/tendermind/tmdata:/tendermint" tendermint/tendermint node --proxy_app=dummy
3. Start tendemint monitor
docker run -it --rm --link=tm tendermint/monitor tendermint_bc:46657
By start of tendermint container I see only one hash, but by docker ps -a container is not listed.
If I run docker logs tendermint_bc, result is:
Error response from daemon: No such container: tendermint_bc
Same workflow on Unix work fine.
Thx for help.

In step 1, you are initializing Tendermint, but not running it. To run it, execute:
docker run --rm -p 46657:46657 --name tendermint_bc -v "C:/Users/user/sandbox/tendermind/tmdata:/tendermint" tendermint/tendermint node --proxy_app=dummy

Related

How to create a Debian docker container that can run docker containers?

I need a Debian container that can run containers itself (and has access to systemd). Following this post, I have tried to run
docker run -v /var/run/docker.sock:/var/run/docker.sock --name debian-buster-slim -h 10-slim -e LANG=C.UTF-8 -it debian:10-slim /bin/bash -l
but the container cannot run docker containers. What am I doing wrong?

How to get access to the docker cmd from docker container?

I've tried to get access to docker command from a container I got an issue says that
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
the container created using this CMD line :
sudo docker run -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/usr/lib/systemd/system/docker.socket --name jenkins-master -d jenkins
Hey Guys the issue was in the socket volume I mean in this section
-v /var/run/docker.sock:/usr/lib/systemd/system/docker.socket
should be change to
-v /var/run/docker.sock:/var/run/docker.sock

docker : docker pull incendonet/centos7-mono-apache

Docker is not started even if the subsequent command is executed.
docker pull incendonet/centos7-mono-apache
Even if you check with docker ps, it does not exist.
Please tell me the cause.
Docker will be started after you run below command :
docker run -it -d image-name
docker run -it -d incendonet/centos7-mono-apache
docker pull command just fetches image from docker hub to your server/local machine. But to run it you need to use docker run.
Once it is running then it will be shown in your docker ps command and you can use below command to get into container's shell :
docker exec -it <container-id> /bin/bash

How to start docker container process after restart machine?

If start a docker container like:
docker run -d -p 5000:5000 --name registry registry:2
It can be seen when run
docker ps
But after restart machine and run docker ps again, it can't been found.
When check docker ps -a can see it exist.
How to week it up at this case if don't want to kill this process to run a new one?
Docker containers don't start automatically on system boot because the Docker default restart policy is set to no.
To achieve that you shoud do:
docker update --restart=always <container ID or name>

I cannot customize the dind (Docker IN Docker)

The dind (Docker IN Docker) pulled from DockerHub works fine, but I cannot build the dind from scratch.
I tried to build as follows.
My Docker version is 1.1.
$ git clone https://github.com/docker-library/docker
$ cd docker/
$ cd 1.1/
$ docker build -t docker:dind .
I could create a "dind" Docker image. After that I tried to run.
$ docker run -it --privileged --name test -d docker:dind
52e590b6636b3726bbe9774627f4424c2b9f8958a745d57c27d04cbec77a2d7b
$ docker run -it --rm --link test:docker docker run -it ubuntu bash
docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.
See 'docker run --help'.
The dind did not work well.
So, I tried to customize from the dind pulled from Docker Hub.
$ docker pull docker:dind
$ docker run -it docker:dind ash
/ # exit
$ docker commit d508c2fd7131 docker:dind
sha256:f20e0314f996fe9f66806df47c1bdff956c84d11a6bfe2ff66279bee968323ec
$ docker run -it --privileged --name test -d docker:dind
d877c1993275fd4039b749f52d60a3095d40d52e13255c4fd88a319ca7ec306a
$ docker run -it --rm --link test:docker docker run -it ubuntu bash
docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.
See 'docker run --help'.
It also had same problem. I just run the "dind" on Docker and exit immediately.
I cannot understand why I cannot customize the "dind" image.
Please tell me how to fix this problem.
Try this.
docker run --privileged -d --name test docker:dind
docker exec -it test docker version
docker commit test mydind
You can use mydind image

Resources