remove entrypoint and add readme

This commit is contained in:
Aleksandr Shpak 2019-06-08 14:59:59 +03:00 committed by GitHub
parent d8588d34cb
commit b93eb38c18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 8 deletions

View File

@ -4,14 +4,16 @@ FROM alpine:3.9
RUN apk --update add tor
# env vars
ENV PROXY_PORT=9050
ARG PROXY_PORT=9050
# add files anf user
RUN adduser -D -h /home/torproxy torproxy
WORKDIR /home/torproxy/
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
# execute from user
USER torproxy
ENTRYPOINT ["./entrypoint.sh"]
RUN echo SOCKSPort 0.0.0.0:${PROXY_PORT} > torrc
EXPOSE ${PROXY_PORT}
ENTRYPOINT ["tor", "--RunAsDaemon", "0", "-f", "torrc"]

View File

@ -1 +1,22 @@
# torsocks-docker
[![Build Status](https://travis-ci.com/shpaker/torsocks-docker.svg?branch=master)](https://travis-ci.com/shpaker/torsocks-docker)
- - -
# Dockerfile with Tor proxy server
## Usage
* Build container
```bash
docker build . -t torsocks
```
* Execute:
```bash
docker run -d -p 9050:9050 torsocks
```
* Check proxy:
```bash
curl -v -x socks5://127.0.0.1:9050 https://checkip.amazonaws.com
```

View File

@ -1,3 +0,0 @@
#!/bin/sh
echo SOCKSPort 0.0.0.0:${PROXY_PORT} >> torrc
tor --RunAsDaemon 0 -f torrc