Skip to content

Commit b8c829c

Browse files
committed
add Dockerfile
1 parent 92b3048 commit b8c829c

File tree

4 files changed

+19
-47
lines changed

4 files changed

+19
-47
lines changed

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM alpine:latest
2+
3+
MAINTAINER ilanyu <[email protected]>
4+
5+
ENV l 0.0.0.0:8888
6+
7+
ENV r http://idea.lanyus.com:80
8+
9+
COPY ReverseProxy_linux_amd64 /usr/bin/ReverseProxy_linux_amd64
10+
11+
RUN chmod a+x /usr/bin/ReverseProxy_linux_amd64
12+
13+
EXPOSE 8888
14+
15+
CMD ["sh", "-c", "/usr/bin/ReverseProxy_linux_amd64 -l $l -r $r"]

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
# ReverseProxy
2-
ReverseProxy in golang
2+
ReverseProxy in golang in docker
33

44
## Use:
55

6-
./ReverseProxy_[OS]_[ARCH] -h
7-
8-
Usage of ReverseProxy_[OS]_[ARCH]:
9-
-l string
10-
listen on ip:port (default "0.0.0.0:8888")
11-
-r string
12-
reverse proxy addr (default "http://idea.lanyus.com:80")
6+
docker pull ilanyu/golang-reverseproxy
137

8+
docker run -d -p 8888:8888 ilanyu/golang-reverseproxy
149

15-
./ReverseProxy_windows_amd64.exe -l "0.0.0.0:8081" -r "https://www.baidu.com"
16-
17-
Listening on 0.0.0.0:8081, forwarding to https://www.baidu.com
10+
docker run -d -p 9999:8888 -e "r=http://blog.lanyus.com" -e "l=0.0.0.0:8888" ilanyu/golang-reverseproxy
1811

ReverseProxy_linux_amd64

1.31 MB
Binary file not shown.

main.go

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)