Skip to main content

Usage

dokrypt exec <service> <command> [args...] [flags]

Arguments

ArgumentRequiredDescription
serviceYesService name (as defined in dokrypt.yaml)
commandYesCommand to execute
argsNoAdditional command arguments

Flags

FlagTypeDefaultDescription
-i, --interactiveboolfalseKeep stdin open
-t, --ttyboolfalseAllocate a pseudo-TTY

Description

Executes a command inside the container of a running service. The command runs with the container’s default user and environment. Stdout and stderr are streamed back to your terminal.

Examples

Run a shell in the ethereum container

dokrypt exec ethereum sh

Query the latest block with cast

dokrypt exec ethereum cast block latest

Check IPFS node identity

dokrypt exec ipfs ipfs id

List files in a container

dokrypt exec ethereum ls -la /

Interactive bash session

dokrypt exec -it ethereum bash

Errors

ErrorCauseSolution
Service not foundService name doesn’t match configCheck dokrypt status for service names
Container not runningThe service is stoppedStart it with dokrypt up --service <name>