Docker & Containers
Expose containerized applications.
Expose Container by IP
Find container IP:
bash
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_nameExpose the container:
bash
drip http 8080 -a 172.17.0.3Expose Container by Name
If using Docker's DNS (custom network):
bash
drip http 3000 -a my-app-containerDatabase Access for Debugging
Expose PostgreSQL:
bash
drip tcp 5432 -a postgres-container --allow-ip YOUR_IPExpose MySQL:
bash
drip tcp 3306 -a mysql-container --allow-ip YOUR_IPExpose Redis:
bash
drip tcp 6379 -a redis-container --allow-ip YOUR_IPExpose MongoDB:
bash
drip tcp 27017 -a mongo-container --allow-ip YOUR_IPDocker Compose Integration
Add Drip to your docker-compose.yml:
yaml
services:
app:
image: my-app
ports:
- "3000:3000"
tunnel:
image: alpine
command: >
sh -c "apk add curl bash &&
bash <(curl -sL https://driptunnel.app/install.sh) --client &&
drip http 3000 -a app -s tunnel.example.com:443 -t YOUR_TOKEN"
depends_on:
- appUsing Host Network Mode
If your container uses host network:
bash
drip http 3000 # Just use localhostDocker Bridge Network
For containers on the default bridge network:
bash
# Get container IP
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mycontainer
# Expose it
drip http 8080 -a 172.17.0.2Custom Docker Network
For containers on a custom network:
bash
# Create network
docker network create mynet
# Run container
docker run --network mynet --name myapp myimage
# From another container on same network, use container name
drip http 8080 -a myappKubernetes Services
Expose a Kubernetes service locally:
bash
kubectl port-forward svc/my-service 8080:80 &
drip http 8080 -n k8s-serviceExpose a pod directly:
bash
kubectl port-forward pod/my-pod 3000:3000 &
drip http 3000 -n k8s-podPodman Containers
Drip works the same way with Podman:
bash
podman inspect -f '{{.NetworkSettings.IPAddress}}' container_name
drip http 8080 -a 10.88.0.2