Reputation: 2487
i'm new to Docker and Ethereum and working through looking to setup an environment to play and access Geth. I have an ubuntu server in Google Cloud. I followed instructions on this docker: https://hub.docker.com/r/ethereum/client-go/. Then, i ran the docker command per the instructions:
docker run -d --name ethereum-node -v /Users/<user>/ethereum:/root \
-p 8545:8545 -p 30303:30303 \
ethereum/client-go
Then i ran the command
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7e5e61551333 ethereum/client-go "geth" 10 seconds ago Up 9 seconds 0.0.0.0:8545->8545/tcp, 0.0.0.0:30303->30303/tcp, 8546/tcp, 30303/udp ethereum-node
When i run the command below, i want to access Geth in the Docker container, but doesn't find it. Is there a way to ensure i'm accessing it in that Docker container?
geth
Command 'geth' not found, but can be installed with:
sudo snap install geth
Upvotes: 0
Views: 273
Reputation: 2937
if i clearly understand your question,
The docker exec command runs a new command in a running container check the doc
try this :
docker exec -ti ethereum-node sh -c "geth"
Upvotes: 1