您正在查看: Other 分类下的文章

Windows WSL 安装docker

1. Add the necessary repository

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

2. Install the necessary dependencies

sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release -y

3. Install Docker

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli docker-compose containerd.io -y
sudo apt install gnome-keyring

4. Add your user to the Docker group

sudo usermod -aG docker $USER
sudo chmod 666 /var/run/docker.sock
sudo service docker restart

5. Testing the installation

docker version
docker pull hello-world

6.fix "System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down"

sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig

sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target

exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

snap version

参考文档

https://www.zdnet.com/article/docker-101-how-to-install-docker-on-ubuntu-server-22-04/
https://gist.github.com/alyleite/ca8b10581dbecd722d9dcc35b50d9b2b
https://docs.docker.com/engine/install/ubuntu/

站长求职或技术合作

经验时间

10年以上开发经验,含五年以上区块链开发经验

大型公链

多个大型公链开发设计与维护经验(火币Heco,Cube,FShares,EOS等)

交易所

FDex去中心化交易所设计与开发维护

矿池

Galaxy Pool去中心化矿池设计与开发

智能合约

多个大型Defi和游戏智能合约设计与开发经验(EOSDoda,FDex,类compound),以及各个公链系统合约

领导组织

为产品组提供去中心化方案的设计与开发以及组内任务分配与跨部门协调

技术推广

维护区块链中文技术社区(bcskill.com)

孵化产品

兼容以太坊高性能公链解决方案(ethdpos.com)
NSetup一键增量升级安装包制作(nsetup.cn)

传统互联网

金山软件5年工作经验(金山词霸,WPS Mail),其余公司和项目若干

联系方式

QQ:652511569
微信:bcskill

QEasyChain 测试链信息

网络信息

类型 网址
区块浏览器 https://www.qeasyweb3.com/
测试水龙头 http://faucet.qeasyweb3.com/
ChainList https://chainlist.org/chain/9528/
节点抵押 http://scan.qeasyweb3.com/

注意

以上为测试链,代币无任何价值
当前为技术预览阶段,链数据可能重置

探索商业公链解决方案服务https://ethdpos.com/

Windows WSL Goland 开发环境部署

对于Windows WSL的安装和对应镜像安装此片不做具体介绍,本篇文章只介绍Goland配置
首先Goland 打开相应代码项目后

通过菜单 File->Settings
打开Settings设置

Run Targets配置

打开Run Targets配置

然后添加 WSL

选择自己本地对应的WSL

根据自己WSL镜像中的go配置,选择对应的目录

然后修改编辑当前编译项目配置,选择前面设置的Targets

最后保存即可在WSL编译项目了

Golang 拉取 Github 私有库的姿势

  1. 设置 GOPRIVATE ,当你设置后, go get 命令在碰到该仓库时,将会不走 Go Proxy 从而进行直连
    go env -w GOPRIVATE=github.com/bcskill
  2. 使用 Github Token
    git config --global url."https://$UserName :$Token@github.com".insteadOf "https://github.com"

    申请 Token 地址如下: https://github.com/settings/tokens

附加
修改ubuntu/centos默认编辑器为vim
一、直接在终端输入

echo export EDITOR=/usr/bin/vim >> ~/.bashrc

二、使用系统管理工具update-alternatives

update-alternatives --config editor
  选择       路径              优先级  状态
------------------------------------------------------------
* 0            /bin/nano            40        自动模式
  1            /bin/ed             -100       手动模式
  2            /bin/nano            40        手动模式
  3            /usr/bin/vim.basic   30        手动模式
  4            /usr/bin/vim.tiny    10        手动模式

选择3

参考
https://www.xhyonline.com/?p=1575
https://www.cnblogs.com/kaishirenshi/p/12194312.html