docker安装go

2023-06-06  本文已影响0人  呦丶耍脾气

查找镜像

docker仓库

执行pull

docker pull golang:1.16.15

开启容器

docker run -itd --name go16 -p 8090:8099 -v C:/wwwroot:/go  golang:1.16.15

将本地目录C:/wwwroo挂在到容器的go
必须要-it,否则执行不起来

进入容器

docker exec -it go16 bash

更新apt-get

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

安装vim

apt-get install vim

上一篇 下一篇

猜你喜欢

热点阅读