Browse Source

Added docker proxy-image to run code in.

Steve Thielemann 5 years ago
parent
commit
0b04356d8a
4 changed files with 30 additions and 0 deletions
  1. 7 0
      .gitignore
  2. 12 0
      docker-compose.yml
  3. 9 0
      proxy-image/Dockerfile
  4. 2 0
      proxy-image/min_req.txt

+ 7 - 0
.gitignore

@@ -0,0 +1,7 @@
+.vscode
+*.lines
+*.raw
+bin/
+lib/
+lib64
+share/

+ 12 - 0
docker-compose.yml

@@ -0,0 +1,12 @@
+
+version: "2"
+
+services:
+  twgsproxy:
+    image: pyproxy
+    build: proxy-image
+    volumes:
+      - ./:/home/python/src
+    working_dir: /home/python/src
+    command: ["python", "tcp-proxy.py"]
+    network_mode: "host"

+ 9 - 0
proxy-image/Dockerfile

@@ -0,0 +1,9 @@
+FROM python:3.7-slim 
+RUN useradd -u 1000 -ms /bin/bash python 
+WORKDIR /home/python
+USER python
+RUN python -m venv /home/python/venv 
+ENV PATH="/home/python/venv/bin:$PATH"
+COPY min_req.txt req.txt
+RUN pip install -r req.txt
+# CMD ["python", "tcp-proxy.py"]

+ 2 - 0
proxy-image/min_req.txt

@@ -0,0 +1,2 @@
+Twisted
+pendulum