Dockerfile 798 B

1234567891011121314151617
  1. # 使用现有的镜像作为基础镜像
  2. FROM docker.all-hands.dev/all-hands-ai/runtime:0.16-nikolaik
  3. # 设置代理服务器
  4. ENV http_proxy=http://192.168.2.11:1881
  5. ENV https_proxy=http://192.168.2.11:1881
  6. ENV no_proxy=localhost,127.0.0.1
  7. # 安装 code-server
  8. RUN curl -fsSL https://code-server.dev/install.sh | sh
  9. COPY ./src/code-server-plugins.py /openhands/code/openhands/runtime/plugins/vscode/__init__.py
  10. # 清除代理设置(可选)
  11. ENV http_proxy=
  12. ENV https_proxy=
  13. ENV no_proxy=
  14. # sudo docker build -t all-hands-code-server:0.16-nikolaik .
  15. # dk run --name csruntime --rm -p 9806:9806 -v /home/mrh/program/openhands/testm:/home/mrh/program/openhands/testm all-hands-code-server:0.16-nikolaik bash -c "code-server --bind-addr 0.0.0.0:9806 --auth none /home/mrh/program/openhands/testm"