remove entrypoint and add readme
This commit is contained in:
parent
d8588d34cb
commit
b93eb38c18
3 changed files with 28 additions and 8 deletions
10
Dockerfile
10
Dockerfile
|
@ -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"]
|
||||
|
|
23
README.md
23
README.md
|
@ -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
|
||||
```
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
echo SOCKSPort 0.0.0.0:${PROXY_PORT} >> torrc
|
||||
tor --RunAsDaemon 0 -f torrc
|
Loading…
Reference in a new issue