Still tunnelto
, but dockerized! 🐳
⚠️ This repository has been archived because tunnelto seems abandoned. ⚠️
- Docker
^20.10
- docker-compose
^1.29
(required if not included in Docker)
In order for the tunnelto
container to communicate with the local webserver, the network isolation between the host and the container must be removed by using the host
network driver.
docker run --rm --net=host backdevs/tunnelto \
--key=my-tunnelto-key \
--port=8080 \
--subdomain=myproject
Note: This use case works best on linux
hosts. You can read more about the limitations and downsides of the host
driver here.
version: "3.8"
services:
...
nginx:
image: nginx:stable-alpine
ports:
- 8080:80
tunnelto:
image: backdevs/tunnelto:latest
environment:
KEY: my-tunnelto-key # Your tunnelto access key (https://dashboard.tunnelto.dev/#account). For security reasons, please use an environment variable.
SCHEME: http # This can be either `http` or `https`, depending on your webserver's configuration.
HOST: nginx # The host service. In this example it's the `nginx` service above.
PORT: 80 # The port that your webserver service listens to.
SUBDOMAIN: myproject # The subdomain that will be used to access your webserver. In this case, it'll be `myproject.tunnelto.dev`.
ports:
- 8081:8080 # The tunnelto inspection dashboard port mapping.
...
Alternatively, instead of defining the arguments as environment variables, the command
service setting can be used.
Simply run the following command.
docker-compose build
Alternatively, if your Docker
installation comes with docker-compose
included.
docker compose build
Opposed to the previous docker-compose
method, with this method you can specify the tunnelto
version as a build argument.
docker build \
--build-arg VERSION=0.1.18 \
--tag backdevs/tunnelto:0.1.18 \
--tag backdevs/tunnelto:latest \
.
All the available environment variables are mapped to tunnelto
arguments.
How they're implemented can be seen in docker-entrypoint.sh
.
KEY
- requiredSCHEME
- optionalHOST
- optional (depending on the use case)PORT
- optionalSUBDOMAIN
- optional (depending on the use case)DASHBOARD_PORT
- optional (default:8080
)
For more detailed explanations and default values, please read the official tunnelto
readme.