From 93c92cdb48defe939707e0b98d6bbf8a7436df29 Mon Sep 17 00:00:00 2001 From: Akashdeep Dhar Date: May 12 2021 05:09:03 +0000 Subject: Reworked compose and build configuration Muted prompts on console attachment to containers Signed-off-by: Akashdeep Dhar --- diff --git a/Dockerfile b/Dockerfile index f77e560..a49184f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ FROM python:3.8-alpine +LABEL maintainer "Akashdeep Dhar " ENV PYTHONUNBUFFERED=1 -WORKDIR /supervisor-driver-service -COPY . . RUN apk add --no-cache docker gcc musl-dev linux-headers redis +COPY requirements.txt requirements.txt RUN pip install -r requirements.txt +COPY src/svdriver svdriver +WORKDIR /svdriver EXPOSE 8888 6969 -ENTRYPOINT ["python3", "falc.py"] +ENTRYPOINT ["python3", "falc.py", "-d", "10", "-q", "2160", "-p", "8888", "-s", "6969", "-4"] diff --git a/docker-compose.yml b/docker-compose.yml index b6e82dd..f45c132 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,5 +7,4 @@ services: - "8888:8888" - "6969:6969" volumes: - - ".:/supervisor-driver-service" - "/var/run/docker.sock:/var/run/docker.sock" diff --git a/src/svdriver/dish/term.py b/src/svdriver/dish/term.py index 77f87c8..ec825b3 100644 --- a/src/svdriver/dish/term.py +++ b/src/svdriver/dish/term.py @@ -37,7 +37,7 @@ class AttachmentEndpoint(tornado.web.RequestHandler): comdexec = self.get_argument("comdexec") self.write(addhandr(contiden, comdexec)) except Exception as expt: - echo(" * Console attachment failed! - " + str(expt)) + # echo(" * Console attachment failed! - " + str(expt)) self.set_header("Access-Control-Allow-Origin", "*") self.write({"retnmesg": "deny"}) @@ -73,7 +73,7 @@ def mainterm(portqant): def addhandr(contiden, comdexec): try: - echo(" * " + comdexec + " attached to " + contiden) + # echo(" * " + comdexec + " attached to " + contiden) urlpatrn = sha256((contiden + comdexec).encode()).hexdigest() comdexec = comdexec.split() stndexec = ["docker", "exec", "-ti", contiden] @@ -95,7 +95,7 @@ def addhandr(contiden, comdexec): "urlpatrn": urlpatrn } except Exception as expt: - echo(" * Failed to attach terminal" + "\n" + str(expt)) + # echo(" * Failed to attach terminal" + "\n" + str(expt)) return { "retnmesg": "deny" }