Sign inSign up

jassue/ngrok

By jassue

Updated about 4 years ago

ngrok-server

Image
3

267

jassue/ngrok repository overview

docker-ngrok-server

Docker image of ngrok server,Based on golang1.7-alpine image.

Environment variables

You can configure ngrok by setting environment variables.

Environment variableDescriptionDefault
NGROK_DOMAINYour ngrok server domain name**None**
TUNNEL_ADDRThe server listens for the tunnel port of the client connection8443
HTTP_ADDRHTTP port listened by the server80
HTTPS_ADDRHTTPS port listened by the server443
WINDOWS_32Compile the client of the Windows 32-bit system0 (No)
WINDOWS_64Compile the client of the Windows 64-bit system1 (Yes)
LINUX_32Compile the client of the Linux 32-bit system0
LINUX_64Compile the client of the Linux 64-bit system1
LINUX_ARMCompile the client of the ARM system0
DARWIN_32Compile the client of the Mac 32-bit system0
DARWIN_64Compile the client of the Mac 64-bit system1

Docker images layout

File/DirectoryDescription
/go/ngrok/bin/certSSL configuration directory
/go/ngrok/bin/ngrokdNgrok server
/go/ngrok/bin/ngrokLinux 64-bit system client
/go/ngrok/bin/linux_386/ngrokLinux 32-bit system client
/go/ngrok/bin/linux_arm/ngrokARM system client
/go/ngrok/bin/windows_386/ngrok.exeWindows 32-bit system client
/go/ngrok/bin/windows_amd64/ngrok.exeWindows 64-bit system client
/go/ngrok/bin/darwin_386/ngrokMac 32-bit system client
/go/ngrok/bin/darwin_amd64/ngrokMac 64-bit system client

Usage

1.Pull docker images
docker pull jassue/ngrok

If you pull the image too slowly, you can also build an ngrok image by cloning the git library.

2.Running ngrok server container
docker run --name ngrok-server -e NGROK_DOMAIN="your domain name" -p 80:80 -p 443:443 -p 8022:8022 -p 8443:8443 -v /data/ngrok:/go/ngrok/bin -d jassue/ngrok

It takes some time for the container to compile the server and client, you can check the progress by the following command.

docker logs ngrok-server

When the log appears [metrics] Reporting every 30 seconds, the ngrok server is already running.

3.Configuring and running the client

Place the compiled client on the device you need to use and create the configuration file ngrok.cfg in the same path as the client. The specific tunnel configuration method can be seen in the official documentation.

server_addr: "your domain name:8443"
trust_host_root_certs: false
tunnels:
    test:
        subdomain: "test"
        proto:
            http: 80
    test-ssh:
        remote_port: 8022
        proto:
            tcp: 8022

Start the client

./ngrok -config=ngrok.cfg start test

After pressing the Enter key, when you see Tunnel Status online, the client successfully starts.

Tag summary

Content type

Image

Digest

Size

126 MB

Last updated

about 4 years ago

docker pull jassue/ngrok