From 5f527831b71c0e46599e9d2114942d1a3963765d Mon Sep 17 00:00:00 2001 From: gtuk Date: Mon, 7 Jun 2021 19:14:51 +0200 Subject: [PATCH] Add docker release step --- .github/workflows/release.yml | 14 ++++++++++++++ .goreleaser.yml | 11 +++++++++++ Dockerfile | 7 +++++++ README.md | 2 +- docker-compose.yaml | 7 +++++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b096144..91325d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,17 +11,31 @@ permissions: jobs: goreleaser: runs-on: ubuntu-latest + env: + DOCKER_CLI_EXPERIMENTAL: "enabled" steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 - name: Set up Go uses: actions/setup-go@v2 with: go-version: 1.16 + - + name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 diff --git a/.goreleaser.yml b/.goreleaser.yml index bb5c37a..a47e44e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -24,6 +24,17 @@ archives: format_overrides: - goos: windows format: zip +dockers: + - goos: linux + goarch: amd64 + ids: ["rotoxy"] + image_templates: + - "gtuk/rotoxy:{{ .Major }}.{{ .Minor }}.{{ .Patch }}" + - "gtuk/rotoxy:{{ .Major }}.{{ .Minor }}" + - "gtuk/rotoxy:{{ .Major }}" + - "gtuk/rotoxy:latest" + use_buildx: true + dockerfile: Dockerfile checksum: name_template: 'checksums.txt' snapshot: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..109cca9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.13.5 + +RUN apk update && apk add tor + +COPY rotoxy / + +ENTRYPOINT ["/rotoxy"] \ No newline at end of file diff --git a/README.md b/README.md index 0a0b8dd..010ee22 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Rotoxy A rotating tor proxy service that starts a configurable number of tor socks proxies and expose them under one reverse proxy (http). -The tor proxy socks proxies are randomly selected by the reverse proxy +The tor socks proxies are randomly selected by the reverse proxy ### Prerequisites In order to use the tool you need have Tor installed on the machine diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..c112b9b --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,7 @@ +version: "3.1" +services: + app: + build: + context: ./dist/goreleaserdocker024990387 + dockerfile: Dockerfile + command: "-tors=3"