Skip to content

Commit d3047eb

Browse files
committed
docs: change image tag to v0.1.6
1 parent db2d686 commit d3047eb

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ jobs:
2020
env:
2121
DOCKER_USER: ${{ secrets.DOCKER_USER }}
2222
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
23-
GOOS: ${{ matrix.goos }}
24-
GOARCH: ${{ matrix.goarch }}
25-
CGO_ENABLED: 0
26-
GO111MODULE: on
2723
run: |
2824
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
2925
- name: Build and Push the Docker image
@@ -32,3 +28,5 @@ jobs:
3228
--tag ${{ secrets.DOCKER_USER }}/http-proxy:$GITHUB_REF_NAME
3329
--file Dockerfile
3430
--push .
31+
- name: Docker Logout
32+
run: docker logout

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM golang:1.20-alpine AS builder
22
RUN apk --no-cache add tzdata
3+
ENV GO111MODULE=on \
4+
CGO_ENABLED=0
35
WORKDIR /build
46
COPY . .
57
RUN go mod tidy && go build -ldflags "-s -w" -o main

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Run with docker
66

77
```bash
8-
docker run -d --net=host -e HTTP_PROXY_LISTEN_ADDR=":8888" --restart always --name http-proxy gobai/http-proxy:v0.1.1
8+
docker run -d --net=host -e HTTP_PROXY_LISTEN_ADDR=":8888" --restart always --name http-proxy gobai/http-proxy:v0.1.6
99
```
1010

1111
### Test
@@ -30,6 +30,12 @@ example:
3030
1.1.1.1/32
3131
```
3232

33+
```bash
34+
mkdir -p http-proxy-conf
35+
echo '127.0.0.1/32' > http-proxy-conf/whitelist
36+
docker run -d --net=host -e HTTP_PROXY_LISTEN_ADDR=":8888" -v ${PWD}/http-proxy-conf:/conf --restart always --name http-proxy gobai/http-proxy:v0.1.6
37+
```
38+
3339
## Environment Variable
3440

3541
| key | default |

0 commit comments

Comments
 (0)