diff --git a/.github/workflows/testing-integration.yaml b/.github/workflows/testing-integration.yaml index b7b25d79..55b53bf8 100644 --- a/.github/workflows/testing-integration.yaml +++ b/.github/workflows/testing-integration.yaml @@ -35,10 +35,10 @@ jobs: - name: 'Run integration tests (proxy config)' run: | make prepare-proxy-config - ls -l ./.mitm - ls -l ./pinecone + + set -x - docker-compose up + DOCKER_GID=$(python -c "import os; print(os.getgid())") DOCKER_UID=$(python -c "import os; print(os.getuid())") docker-compose up -d docker-compose ps ls ${{ github.workspace }}/.mitm/proxy1 diff --git a/Makefile b/Makefile index 5b3158b7..78c3ddea 100644 --- a/Makefile +++ b/Makefile @@ -52,4 +52,7 @@ prepare-proxy-config: mkdir -p .mitm/proxy2 proxy-up: prepare-proxy-config - WORKDIR=${mkfile_path} docker-compose up -d \ No newline at end of file + DOCKER_GID=$$(python -c "import os; print(os.getgid())") DOCKER_UID=$$(python -c "import os; print(os.getuid())") docker-compose up -d --remove-orphans + +proxy-stop: + DOCKER_GID=$$(python -c "import os; print(os.getgid())") DOCKER_UID=$$(python -c "import os; print(os.getuid())") docker-compose stop \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index b307a55f..9ff49964 100644 --- a/compose.yaml +++ b/compose.yaml @@ -2,17 +2,19 @@ version: "3.8" services: proxy: + user: "${DOCKER_UID}:${DOCKER_GID}" image: mitmproxy/mitmproxy command: mitmdump ports: - 8080:8080 volumes: - - ./pinecone:/home/mitmproxy/.mitmproxy + - ./mitm/proxy1:/home/mitmproxy/.mitmproxy proxy-w-auth: + user: "${DOCKER_UID}:${DOCKER_GID}" image: mitmproxy/mitmproxy command: mitmdump --set proxyauth=testuser:testpassword ports: - 8081:8080 volumes: - - ./pinecone:/home/mitmproxy/.mitmproxy \ No newline at end of file + - ./mitm/proxy2:/home/mitmproxy/.mitmproxy \ No newline at end of file