From 05d2a289e970f9a6667c1e65810a55fd08aa2dcd Mon Sep 17 00:00:00 2001 From: Harry-zklcdc Date: Mon, 15 Apr 2024 18:32:26 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=20=F0=9F=90=9B=20CodeSandbox=20Use=20Buil?= =?UTF-8?q?d=20Cache=20when=20Setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/Dockerfile | 4 +++- .devcontainer/devcontainer.json | 6 +++--- .devcontainer/docker-compose.yml | 13 +++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .devcontainer/docker-compose.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 418d7863ff..657fee3545 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -12,4 +12,6 @@ RUN rm go-bingai-pass-linux-amd64.tar.gz go-proxy-bingai-linux-amd64.tar.gz COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf -EXPOSE 8080 45678 9005 \ No newline at end of file +EXPOSE 8080 45678 9005 + +CMD [ "/usr/bin/bash", "-c", "while true;do sleep 3600;done" ] \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index eb8a9613e3..ffab6035e4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Go Proxy BingAI", - "build": { - "dockerfile": "./Dockerfile" - } + "dockerComposeFile": "docker-compose.yml", + "service": "go-proxy-bingai", + "workspaceFolder": "/app" } diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000000..1c3f01c284 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,13 @@ +services: + go-proxy-bingai: + build: + context: . + dockerfile: Dockerfile + no_cache: true + environment: + - HEADLESS=false + - PASS_TIMEOUT=5 + ports: + - 8080:8080 + - 45678:45678 + - 9005:9005 \ No newline at end of file