MCPcopy Index your code
hub / github.com/abiosoft/dockward

github.com/abiosoft/dockward @0.0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.0.4 ↗ · + Follow
57 symbols 151 edges 15 files 43 documented · 75%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dockward

Port forwarding tool for Docker containers.

Demonstration

Typical Dockward use cases include: * Port forwarding to containers without published ports. * Port forwarding to containers based on a filter. * Testing stateless app scaled via docker-compose.

Requirements

Docker 1.10 and docker deamon running.

Installation

Homebrew (OSX only)

brew install dockward

Binary

Download binary for other platforms on the releases page or replace download link accordingly for OSX.

curl -LO https://github.com/abiosoft/dockward/releases/download/0.0.4/dockward_linux_amd64.tar.gz \
&& tar xvfz dockward_linux_amd64.tar.gz \
&& sudo mv dockward_linux_amd64 /usr/local/bin/dockward \
&& sudo chmod +x /usr/local/bin/dockward

Source

Requires Go.

go get -v -u github.com/abiosoft/dockward

Usage

Note: If dockward is not running on Linux or docker host, you will access it via docker host ip (e.g. dockermachine ip). Except --host mode.

Forward port 8080 to port 8080 in container amazing_leavitt.

dockward 8080 name=amazing_levitt

Forward port 8080 to port 80 in containers with label type=nginx.

dockward 8080 80 label=type=nginx

Forward port 8080 to a local port 3000.

dockward --host 8080 3000

Forward port 8080 to endpoints 127.0.0.1:3000 and 127.0.0.1:3001.

dockward --host 8080 127.0.0.1:3000 127.0.0.1:3001

For more.

dockward --help

Limitations

  • Dockward is intended for simple local development use cases. It may work for you outside of that.
  • Docker networks created are default settings i.e. bridge/overlay as the case may be. Nothing special.

Why the name ?

Naming is hard, you know.

DockerForward, port forwarding tool for docker containers.

License

Apache 2

Extension points exported contracts — how you extend this code

Policy (Interface)
Policy is a selection policy. [3 implementers]
balancer/schedule.go

Core symbols most depended-on inside this repo

usageErr
called by 7
cli/cli.go
exitIfErr
called by 6
cli/cli.go
exit
called by 6
cli/cli.go
Addr
called by 6
balancer/endpoint.go
connectContainer
called by 3
cli/container.go
Len
called by 3
balancer/endpoint.go
Add
called by 3
balancer/endpoint.go
addCleanUpFunc
called by 2
cli/cleanup.go

Shape

Function 30
Method 15
Struct 9
TypeAlias 2
Interface 1

Languages

Go100%

Modules by API surface

balancer/endpoint.go9 symbols
balancer/schedule.go7 symbols
network/network.go6 symbols
balancer/balancer.go6 symbols
cli/container.go5 symbols
cli/cli.go5 symbols
cli/monitor.go4 symbols
cli/docker.go3 symbols
cli/cleanup.go3 symbols
util/util.go2 symbols
cli/forward.go2 symbols
cli/filter.go2 symbols

For agents

$ claude mcp add dockward \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page