Guide
Run the connector in Docker
Run the connector in a container for a server or a build job.
- Applies to
- Connector 0.2.0
- Time
- About 10 minutes
- What it changes
- Runs the connector as a non-root user in a container.
- Last reviewed
- , by Product documentation
Before you begin
- Docker, and the connector's source tree, which contains distribution/docker/Dockerfile.
What to know before you start
- A container has no operating system credential store, so pass a one-use credential on standard input.
- There is no published container image yet. The definition is in the connector's source tree, so you build it yourself.
Steps
Step 1. Build the image from the connector's source tree.
Terminal docker build -t instawormhole/connector -f distribution/docker/Dockerfile .You should see: Docker reports the image was built and tagged instawormhole/connector.
Step 2. Run it with a credential on standard input.
Terminal docker run --rm -i instawormhole/connector run --relay wss://relay.instawormhole.site --origin 127.0.0.1:3000 --credential-stdin < credential.txtThe image runs as a non-root user. With --network host on Linux, 127.0.0.1 reaches services on the host. Otherwise run the connector in the same network namespace as your app, for example with --network container:<app>.
You should see: The container prints the public address.
You are done when
- The container prints a public address for your app.
Undo or clean up
- Stop the container.
Good to know
Related
This page is part of Connect a local app. Still stuck? Contact support.