Skip to content

CyberL1/Dockport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

Dockport is a lighweight, automatic proxy for docker containers.

How to set this up?

  1. Create a network for Dockport:
docker network create Dockport
  1. Run the proxy using:
docker run -d --name Dockport -v Dockport:/Dockport/data -e PROXY_DOMAIN=localhost --network Dockport -p 80:80 -p 2222:22 ghcr.io/cyberl1/dockport

How to use this for http?

  1. Run another container connected to the proxy network:
docker run -d --name another-container --network Dockport nginx:alpine
  1. Go to http://another-container.localhost in your browser and see the result. If your container is listening on diffrent port (i.e 8080), then go to http://another-container-8080.localhost

How to use this for ssh?

  1. Run another container connected to the proxy network:
docker run -d --name another-container --network Dockport alpine /bin/sh -c 'apk update && apk add openssh && adduser user --gecos "" --disabled-password && echo "user:password" | chpasswd && ssh-keygen -A && /usr/sbin/sshd -D'
  1. Connect to it using:
ssh -J localhost:2222 user@another-container

About

A simple automatic http/ssh proxy for docker

Resources

Stars

Watchers

Forks

Packages