S-CORE Docker 环境

Step1: load them into your WSL2 environment by command:

"docker load -i <tar_file>"

复制代码
docker run -it --rm \
  --name persistency_demo \
  --entrypoint /bin/bash \
  vsc-vsps_persistency_demo:latest

启动已停止的容器

docker start -i car_demo

在Docker中

使用 docker0 的 IP 作为代理

export HTTP_PROXY=http://172.17.0.1:3129

export HTTPS_PROXY=http://172.17.0.1:3129

export http_proxy=http://172.17.0.1:3129

export https_proxy=http://172.17.0.1:3129

export NO_PROXY=localhost,127.0.0.1

测试

curl -I https://www.baidu.com

解决方案:配置 apt 使用代理

方法1:临时配置 apt 代理(推荐)

bash

复制代码
# 使用 -o 选项临时指定代理
sudo apt -o Acquire::http::Proxy="http://172.17.0.1:3129" -o Acquire::https::Proxy="http://172.17.0.1:3129" update

方法2:永久配置 apt 代理

bash

复制代码
# 创建 apt 代理配置文件
echo 'Acquire::http::Proxy "http://172.17.0.1:3129";
Acquire::https::Proxy "http://172.17.0.1:3129";' | sudo tee /etc/apt/apt.conf.d/95proxies

# 然后正常使用 apt
sudo apt update

您当前容器正在运行,可以直接使用此命令:

复制代码
# 在宿主机(不是容器内)执行
# 拷贝整个项目目录到容器的 /root 目录
docker cp /home/iiu4sgh/VSPS_GP_0.1.0 car_demo:/root/
car_demo是通过docker ps看出来的

# 或者拷贝当前目录下的项目
docker cp ~/VSPS_GP_0.1.0 car_demo:/root/

拷贝完成后,进入容器即可看到项目:

复制代码
docker start -i car_demo
cd /root/VSPS_GP_0.1.0
bazel build //...

docker cp 常用语法

复制代码
# 拷贝文件到容器
docker cp /主机/文件路径 容器名:/容器/目标路径
相关推荐
俊俊几年的1 小时前
RK3588 硬件架构详解:CPU、GPU、NPU 与 RKNN 软件栈
linux·c++·python·yolo·numpy·rockchip
沫璃染墨2 小时前
从零入门MySQL系列(一):Linux 环境下 MySQL 安装部署、服务启动与首次登录问题排查
linux·运维·数据库·sql·mysql·database·数据库架构
打工仔折腾 AI2 小时前
Linux网络:UDP一次sendto对应一次recvfrom的底层机制解析
linux·网络·人工智能·后端·python·性能优化·udp
程序员与背包客_CoderZ2 小时前
Linux C++异步网络编程:c-ares高性能DNS解析编码实战
linux·服务器·c语言·开发语言·网络·c++·网络编程
鱼很腾apoc2 小时前
【Redis】第4期 详解主从复制、哨兵、集群
linux·redis·学习·集群·主从复制·哨兵
老一岁2 小时前
Git详解_提交_回退_分支_合并
大数据·linux·git
ai_xiaogui2 小时前
Ubuntu Server 安装避坑实录:服务器装成桌面版、网卡驱动缺失怎么办?
linux·服务器·ubuntu·ubuntu server·ubuntu 网卡驱动安装·服务器装机避坑·服务器装机
小则又沐风a3 小时前
线程的互斥和同步
linux·c++
开发者导航3 小时前
Cursor plugins 插件仓库上手:结构解析与安装使用教程
android·linux·ubuntu·ai·typescript·cursor·插件开发
飞花漫卷,情随岁迁3 小时前
命令进阶与 Playbook 快速入门
java·linux·运维·服务器·网络·数据库·智能路由器