프로그래밍 툴/Docker
ngrok로 로컬호스트 외부에서 접속하기
험자
2020. 7. 23. 09:03
installation
- download file (e.g.,
ngrok-stable-linux-amd64.zip
) from here - extract compressed file
- locate it where PATH is set up so it can be available anywhere, e.g., /usr/local/bin
implementation
ngrok http <port-to-expose>
# e.g., for jenkins docker container created as below
$ docker run --name jenkins \
-d -p 8888:8080 \
-v jenkins_home:/var/jenkins_home \
jenkinsci/blueocean
# run ngrok as below:
$ ngrok http 8888
Session Status online
Session Expires 7 hours, 59 minutes
Version 2.3.35
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://f844933e6dce.ngrok.io -> http://localhost:8888
Forwarding https://f844933e6dce.ngrok.io -> http://localhost:8888
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
# localhost is then accessible via http://f844933e6dce.ngrok.io