Docker Windows
使用WSL修改docker文件存储位置
WSL2模式下docker-desktop-data vm磁盘映像通常位于以下位置:
1 C:\Users\XXX\AppData\Local\Docker\wsl\data\ext4.vhdx
按照以下说明将其重新定位到其他驱动器/目录,并保留所有现有的Docker数据。
首先,右键单击Docker Desktop
图标关闭Docker桌面,然后选择退出Docker桌面,然后,打开命令提示符:
确保两个状态都已停止。
1、将docker-desktop-data
导出到文件中(备份image及相关文件),使用如下命令
1 wsl --export docker-desktop-data "D:\\docker-desktop-data.tar"
2、从wsl取消注册
docker-desktop-data,请注意
1 C:\Users\XXX\AppData\Local\Docker\wsl\data\ext4.vhdx
文件将被自动删除。
1 wsl --unregister docker-desktop-data
3、将导出的docker-desktop-data
再导入回wsl,并设置我们想要的路径,即新的镜像及各种docker使用的文件的挂载目录,我这里设置到D:\\docker\\wsl
1 wsl --import docker-desktop-data "D:\\docker\\wsl" "D:\\docker-desktop-data.tar" --version 2
4、命令执行完毕,就能再目录下看到文件了,这时启动Docker
Desktop,可以正常工作了
切换docker中国源
在settings->docker engine修改配置文件添加国内源
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 { "registry-mirrors" : [ "http://ovfftd6p.mirror.aliyuncs.com" , "http://registry.docker-cn.com" , "http://docker.mirrors.ustc.edu.cn" , "http://hub-mirror.c.163.com" ], "insecure-registries" : [ "registry.docker-cn.com" , "docker.mirrors.ustc.edu.cn" ], "debug" : false, "experimental" : false, "features" : { "buildkit" : true }, "builder" : { "gc" : { "enabled" : true, "defaultKeepStorage" : "20GB" } } }
MySQL
1、pull MySQL
1 2 docker search mysql docker pull mysql
2、start images
1 docker run -p 3306:3306 --name mysql -v D:\docker\mysql\conf:/etc/mysql/conf.d -v D:\docker\mysql\logs:/var/log/mysql -v D:\docker\mysql\data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
1 2 3 4 5 6 7 8 9 10 命令解释说明: -p 3306:3306:将主机的3306端口映射到docker容器的3306端口。 --name mysql:运行服务名字 -v D:\docker\mysql\conf:/etc/mysql/conf.d :将主机/mydocker/mysql录下的conf/my.cnf 挂载到容器的 /etc/mysql/conf.d -v D:\docker\mysql\logs:/var/log/mysql:将主机/mydocker/mysql目录下的 logs 目录挂载到容器的 /logs。 -v D:\docker\mysql\data:/var/lib/mysql :将主机/mydocker/mysql目录下的data目录挂载到容器的 /var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456:初始化 root 用户的密码。 -d mysql :后台程序运行mysql5 --character-set-server=utf8mb4 :设置字符集 --collation-server=utf8mb4_unicode_ci:设置校对集
在macOS设置为 1 docker run -p 3306:3306 --name mysql -v /Users/dy/docker/mysql/conf:/etc/mysql/conf.d -v /Users/dy/docker/mysql/logs:/var/log/mysql -v /Users/dy/docker/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
在Ubuntu设置为 1 docker run -p 3306:3306 --name mysql -v /home/docker/mysql/conf:/etc/mysql/conf.d -v /home/docker/mysql/logs:/var/log/mysql -v /home/docker/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
3、查看容器日志
1 docker logs -f -t --tail 100 b02d3de2254a
4、连接到Navicat Premium
Docker安装PostgreSQL
https://www.cnblogs.com/d1012181765/p/15513490.html
1 2 3 4 5 6 7 8 docker search postgresql docker pull postgres docker run --name wiki_postgresql -e POSTGRES_PASSWORD=postgresql -p 5432:5432 \\ -v D:\docker\pgdata:/var/lib/postgresql/data -d postgres:latest // login postgres / postgresql
MongoDB
拉取镜像
1 2 docker search mongo docker pull mongo
创建数据卷映射目录
1 2 3 4 5 6 # windows mkdir D:\docker\mongodb\data mkdir D:\docker\mongodb\conf mkdir D:\docker\mongodb\backup # macos
启动容器
1 docker run --name=mongodb -v D:\docker\mongodb\data:/data/db -v D:\docker\mongodb\backup:/data/backup -v D:\docker\mongodb\conf:/data/configdb --restart=on-failure:3 -p 27017:27017 -d mongo
1 2 3 4 5 –name=mongodb : 容器名称 -v : 映射目录 -p : 映射端口 -d mongo : 守护式方式启动镜像 mongo –auth : 认证, 单机使用建议不认证
认证过程
1 2 3 4 5 6 // 进入容器创建用户 docker exec -it mongodb mongo admin // 创建用户 db.createUser({user:'admin',pwd:'123456',roles:[{role:'root',db:'admin'}],}) // 认证admin用户 db.auth('admin','123456')
ClickHouse
拉取镜像
1 2 3 docker search clickhouse docker pull yandex/clickhouse-server docker pull yandex/clickhouse-client
click-house的docker镜像是不完整的Ubuntu,直接进入容器修改需要自行安装vi,这里采用临时性容器的方法取出配置文件修改
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 // 运行一个临时容器 // windows docker run --rm -d --name=temp-clickhouse-server yandex/clickhouse-server docker cp temp-clickhouse-server:/etc/clickhouse-server/config.xml D:\docker\clickhouse\single\conf\config.xml docker cp temp-clickhouse-server:/etc/clickhouse-server/users.xml D:\docker\clickhouse\single\conf\users.xml // macos docker run --rm -d --name=temp-clickhouse-server yandex/clickhouse-server docker cp temp-clickhouse-server:/etc/clickhouse-server/config.xml /Users/dy/docker/clickhouse/single/conf/config.xml docker cp temp-clickhouse-server:/etc/clickhouse-server/users.xml /Users/dy/docker/clickhouse/single/conf/users.xml // ubuntu docker run --rm -d --name=temp-clickhouse-server yandex/clickhouse-server docker cp temp-clickhouse-server:/etc/clickhouse-server/config.xml /root/docker/clickhouse/single/conf/config.xml docker cp temp-clickhouse-server:/etc/clickhouse-server/users.xml /root/docker/clickhouse/single/conf/users.xml 进入临时容器获取sha256sum docker exec -it temp-clickhouse-server /bin/bash PASSWORD=$(base64 < /dev/urandom | head -c8); echo "default"; echo -n "default" | sha256sum | tr -d '-' PASSWORD=$(base64 < /dev/urandom | head -c8); echo "root"; echo -n "root" | sha256sum | tr -d '-'
ClickHouse Server
服务本身依赖三个端口,这三个端口的默认值是9000
(TCP
协议)、8123
(HTTP
协议)和9009
(集群数据复制),映射到宿主机的时候尽可能一一对应,所以需要确保宿主机的这三个端口没有被占用,可以使用Docker
的参数-p
指定容器和宿主机的端口映射。
ClickHouse Server
正常使用需要修改容器系统的文件句柄数量配置ulimit nofile
,可以使用Docker
参数--ulimit nofile=262144:262144
指定文件句柄数。
可以运用一个技巧,使用Docker
的--rm
参数创建临时容器,先获取到/etc/clickhouse-server
目录下配置文件,通过docker cp 容器目录 宿主机目录
命令可以拷贝容器的配置文件到宿主机目录下,容器停止之后会被直接删除,这样就能保留宿主机的配置文件模板。
需要设置开放客户端监听的Host
,避免后面使用JDBC
客户端或者ClickHouse Client
的时候无法连接ClickHouse Server
。
修改配置文件users.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 <users > <default > <password_sha256_hex > 37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f</password_sha256_hex > <networks incl ="network" replace ="replace" > <ip > ::/0</ip > </networks > <profile > default</profile > <quota > default</quota > </default > <root > <password_sha256_hex > 4813494d137e1631bba301d5acab6e7bb7aa74ce1185d456565ef51d737677b2</password_sha256_hex > <networks incl ="network" replace ="replace" > <ip > ::/0</ip > </networks > <profile > default</profile > <quota > default</quota > </root > </users >
修改配置文件config.xml
让所有的host都可以访问
1 <listen_host > 0.0.0.0</listen_host >
1 2 3 4 5 6 7 8 9 10 // 停止和销毁临时容器 docker stop temp-clickhouse-server // windows docker run -d --name=single-clickhouse-server -p 8123:8123 -p 9000:9000 -p 9009:9009 --ulimit nofile=262144:262144 -v D:\docker\clickhouse\single\data:/var/lib/clickhouse:rw -v D:\docker\clickhouse\single\conf:/etc/clickhouse-server:rw -v D:\docker\clickhouse\single\log:/var/log/clickhouse-server:rw yandex/clickhouse-server // macos docker run -d --name=single-clickhouse-server -p 8123:8123 -p 9000:9000 -p 9009:9009 --ulimit nofile=262144:262144 -v /Users/dy/docker/clickhouse/single/data:/var/lib/clickhouse:rw -v /Users/dy/docker/clickhouse/single/conf:/etc/clickhouse-server:rw -v /Users/dy/docker/clickhouse/single/log:/var/log/clickhouse-server:rw yandex/clickhouse-server // ubuntu docker run -d --name=single-clickhouse-server -p 8123:8123 -p 9000:9000 -p 9009:9009 --ulimit nofile=262144:262144 -v /home/dy/docker/clickhouse/single/data:/var/lib/clickhouse:rw -v /home/dy/docker/clickhouse/single/conf:/etc/clickhouse-server:rw -v /home/dy/docker/clickhouse/single/log:/var/log/clickhouse-server:rw yandex/clickhouse-server
1 2 3 4 5 6 7 命名和容器命名:docker run -d --name=single-clickhouse-server 端口映射:-p 8123:8123 -p 9000:9000 -p 9009:9009 文件句柄数配置:--ulimit nofile=262144:262144 数据目录映射:-v E:/Docker/images/clickhouse-server/single/data:/var/lib/clickhouse:rw 配置目录映射:-v E:/Docker/images/clickhouse-server/single/conf:/etc/clickhouse-server:rw 日志目录映射:-v E:/Docker/images/clickhouse-server/single/log:/var/log/clickhouse-server:rw 镜像:yandex/clickhouse-server
设置自动启动 1 docker update --restart always single-clickhouse-server
使用原生的命令行客户端ClickHouse Client
进行连接测试
1 docker run -it --rm --link single-clickhouse-server:clickhouse-server yandex/clickhouse-client -uroot --password root --host clickhouse-server
Docker 开发环境
SSH开发环境 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 docker pull ubuntu docker run --name iubuntu -t -i -d -p 3316:22 ubuntu docker exec -t -i iubuntu /bin/bash apt-get update apt-get install -y vim vim /etc/apt/sources.list # 进入文件编辑模式 gg # 进入行首 dG # 文件内容将被全部清空 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security multiverse :wq # 保存退出 apt-get update apt-get dist-upgrade apt-get install -y sudo vim git net-tools rsync sudo iputils-ping apt-get install -y openssh-client openssh-server /etc/init.d/ssh start ps -e|grep ssh vim /etc/ssh/sshd_config PermitRootLogin yes service ssh restart passwd root exit
Docker容器中添加中文字符的支持
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 locale -a apt-get update apt-get install -y locales apt-get install language-pack-zh-hans locale-gen zh_CN locale-gen zh_CN.utf8 locale-gen zh_CN.UTF-8 locale-gen zh_CN.GB18030 # 看看当前启用的本地支持 locale -a export LANG=zh_CN.UTF-8 export LC_ALL=zh_CN.UTF-8 export LANGUAGE=zh_CN.UTF-8 # 现在来看看当前的字符集 locale sudo update-locale LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8 LANGUAGE=zh_CN.UTF-8 cat /etc/default/locale
C++开发环境 - Vcpkg
1 2 3 4 5 6 apt-get install -y build-essential cmake gdb gdbserver apt-get install -y build-essential tar curl zip unzip git clone https://github.com/microsoft/vcpkg ./vcpkg/bootstrap-vcpkg.sh ./vcpkg/vcpkg search nng ./vcpkg/vcpkg install nng
1 2 -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake -DCMAKE_TOOLCHAIN_FILE=/otslib/vcpkg/scripts/buildsystems/vcpkg.cmake
Python 开发环境
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh bash conda config --set show_channel_urls yes vim ~/.condarc channels: - defaults show_channel_urls: true default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud conda update conda conda update python pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip install pip -U
web-vscode 安装搭建
https://zhuanlan.zhihu.com/p/115450863
https://www.jianshu.com/p/8408e06b7273
1 2 3 4 5 6 7 8 9 10 11 12 export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:789apt-get install curl curl -fsSL https://code-server.dev/install.sh | sh export PASSWORD="1234567890" vim ~/.config/code-server/config.yaml bind-addr: 0.0.0.0:3317 auth: password password: 1234567890 cert: false code-server --port 3317 --host 0.0.0.0 --auth password
docker 镜像管理 1 2 3 4 5 6 7 8 9 10 11 12 13 docker commit iubuntu ubuntu-ssh docker save ubuntu-ssh > ubuntu-ssh.tar docker load < ubuntu-ssh.tar docker run --name ubuntu-web -t -i -d -p 3316:22 -p 3317:3317 -p 8889:8889 ubuntu-ssh /usr/sbin/sshd -D docker exec -t -i ubuntu-web /bin/bash docker commit jupyterhub jupyterhub docker save jupyterhub > jupyterhub.tar docker load < jupyterhub.tar docker run --name jupyterhub -t -i -d -p 3316:22 -p 3317:3317 -p 8889:8889 jupyterhub /usr/sbin/sshd -D docker exec -t -i jupyterhub /bin/bash
JupyterHub
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 docker load < ubuntu-ssh.tar docker run --name ubuntu-web -t -i -d -p 3316:22 -p 3317:3317 -p 8889:8889 ubuntu-ssh /usr/sbin/sshd -D docker exec -t -i ubuntu-web /bin/bash wget https://npmmirror.com/mirrors/node/v16.13.1/node-v16.13.1-linux-x64.tar.xz tar -xvf node-v16.13.1-linux-x64.tar.xz rm -rf node-v16.13.1-linux-x64.tar.xz ln -s /node-v16.13.1-linux-x64/bin/node /usr/local/bin ln -s /node-v16.13.1-linux-x64/bin/npm /usr/local/bin node -v npm -v npm install -g npm@8.2.0 npm config set registry https://registry.npm.taobao.org npm install -g configurable-http-proxy conda install jupyterlab conda install jupyterhub conda install notebook cd /home mkdir notebook git clone https://github.com/jupyterhub/nativeauthenticator.git cd nativeauthenticator pip install -e . mkdir /etc/jupyterhub cd /etc/jupyterhub jupyterhub --generate-config -f jupyterhub_config.py vim jupyterhub_config.py mkdir /opt/notebook jupyterhub --ip 0.0.0.0 --port 8889 -f /etc/jupyterhub/jupyterhub_config.py sudo -u yourname /path/to/conda/bin/jupyterhub-singleuser -h docker commit jupyterhub jupyterhub docker save jupyterhub > jupyterhub.tar docker load < jupyterhub.tar docker run --name jupyterhub -t -i -d -p 3316:22 -p 3317:3317 -p 8889:8889 jupyterhub /usr/sbin/sshd -D docker exec -t -i jupyterhub /bin/bash jupyterhub --ip 0.0.0.0 --port 8889 -f /etc/jupyterhub/jupyterhub_config.py # 增加用户 注册 http://192.168.1.89:8889/hub/signup # 使用db2,Ubuntu物理机账户登录,核准注册账户 http://192.168.1.89:8889/hub/authorize
1 2 3 4 5 6 7 8 9 10 11 12 13 14 import pwd, subprocessc.JupyterHub.authenticator_class = 'nativeauthenticator.NativeAuthenticator' c.Authenticator.admin_users = {'admin' , 'guest' } def pre_spawn_hook (spawner ): username = spawner.user.name try : pwd.getpwnam(username) except KeyError: subprocess.check_call(['useradd' , '-ms' , '/bin/bash' , username]) c.Spawner.pre_spawn_hook = pre_spawn_hook c.Spawner.default_url = '/lab'
Gogs服务
https://www.cnblogs.com/shanfeng1000/p/14622319.html
1 2 docker pull gogs/gogs docker run -d -p 10022:22 -p 13000:3000 gogs/gogs
Superset
https://www.jianshu.com/p/e299cfd0f482
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 # 安装 docker search superset docker pull amancevice/superset mkdir /home/docker/superset/ -p docker run -d -p 8088:8088 -v /home/docker/superset:/home/superset amancevice/superset # 启动 docker exec -it keen_nash superset-init admin Lindao123456 # docker update --restart always 容器名 docker update --restart always keen_nash # 修改中文 docker exec -it --user root 01a688894764 /bin/bash apt-get install vim cd /usr/local/lib/python3.8/site-packages/superset vim config.py BABEL_DEFAULT_LOCALE = 'zh' # docker连通设置 docker network connect --alias superset db2-net keen_nash # 添加防火墙 sudo ufw allow 8088 sudo ufw reload # 设置数据库 http://192.168.1.89:8088/login/ clickhouse://default:default@192.168.1.89:8123/min_data clickhouse://default:default@single-clickhouse-server:8123/min_data
Ubuntu主机
ubuntu 安装ssh https://segmentfault.com/a/1190000022103074
1 2 3 sudo apt install openssh-server sudo systemctl status ssh sudo ufw allow ssh
ubuntu对外开放端口 1 2 3 4 5 sudo ufw status # 查看已经开启的端口 sudo ufw allow 3317 # 打开端口 sudo ufw enable # 开启防火墙 sudo ufw reload # 重启防火墙 sudo ufw status # 查看一下端口是否已开放
Docker 互相访问
https://blog.csdn.net/cjbfzxz/article/details/106652867
1 2 3 docker network create testnet docker network connect --alias db-clickhouse testnet single-clickhouse-server docker inspect --format '{{ .NetworkSettings.IPAddress }}' $(docker ps -q)
Docker-Ubuntu环境构建
启动容器设置国内源
1 2 3 4 # 启动容器 docker pull ubuntu docker run --name iubuntu -t -i -d -p 4100:22 ubuntu docker exec -t -i iubuntu /bin/bash
设置清华源
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 # install vim apt-get update apt-get install -y vim vim /etc/apt/sources.list i # 进入文件编辑模式 gg # 进入行首 dG # 文件内容将被全部清空 :wq # 保存退出 # Ubuntu 清华源 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security multiverse
SSH
1 2 3 4 5 6 7 8 9 10 11 apt-get update apt-get dist-upgrade apt-get install -y sudo vim git net-tools rsync sudo iputils-ping apt-get install -y openssh-client openssh-server /etc/init.d/ssh start ps -e|grep ssh vim /etc/ssh/sshd_config PermitRootLogin yes service ssh restart passwd root
vscode-web
1 2 3 4 5 6 7 8 9 10 11 12 apt-get install curl curl -fsSL https://code-server.dev/install.sh | sh vim ~/.config/code-server/config.yaml bind-addr: 0.0.0.0:4111 auth: password password: 1234567890 cert: false # 启动vscode-web code-server --port 4111 --host 0.0.0.0 --auth password
C++开发环境
https://github.com/microsoft/vcpkg/blob/master/README_zh_CN.md#安装-linux-developer-tools
1 2 3 4 5 6 apt-get install -y build-essential cmake gdb gdbserver apt-get install -y build-essential tar curl zip unzip # git clone https://github.com/microsoft/vcpkg # ./vcpkg/bootstrap-vcpkg.sh # ./vcpkg/vcpkg search nng # ./vcpkg/vcpkg install nng
Libstdc++.so.6:
version `GLIBCXX_3.4.22’ not found(conda)
1 2 3 4 5 strings /opt/miniconda3/lib/libstdc++.so.6 | grep GLIBCXX strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX cd /opt/miniconda3/lib rm libstdc++.so.6 cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./
nng
Docker-Ubunut设置时区
1 2 3 apt-get install tzdata tzselect
Python 开发环境
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh bash conda config --set show_channel_urls yes vim ~/.condarc channels: - defaults show_channel_urls: true default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud conda update conda conda update python pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip install pip -U pip install "pybind11[global]"
配置Docker-Ubuntu的中文环境
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 locale -a apt-get update apt-get install -y locales apt-get install language-pack-zh-hans locale-gen zh_CN locale-gen zh_CN.utf8 locale-gen zh_CN.UTF-8 locale-gen zh_CN.GB18030 # 看看当前启用的本地支持 locale -a export LANG=zh_CN.UTF-8 export LC_ALL=zh_CN.UTF-8 export LANGUAGE=zh_CN.UTF-8 # 现在来看看当前的字符集 locale sudo update-locale LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8 LANGUAGE=zh_CN.UTF-8 cat /etc/default/locale
设置ssh远程连接开发
1 2 3 4 5 6 docker commit iubuntu ubuntu-ctp docker save ubuntu-ctp > ubuntu-ctp.tar docker load < ubuntu-ctp.tar docker run --name ubuntu-ctp -t -i -d -p 4100:22 -p 4111:4111 ubuntu-ctp /usr/sbin/sshd -D docker exec -t -i ubuntu-ctp /bin/bash
设置Docker虚拟网络
连接虚拟网络
1 2 3 docker network create testnet docker network connect --alias single-clickhouse-server testnet single-clickhouse-server docker network connect --alias ubuntu-ctp testnet ubuntu-ctp
参考目录
win10上修改docker的镜像文件存储位置(九)-
通过WSL2修改
Docker中国源
Docker下安装MySQL
docker安装mongodb并挂载_Vick
C的博客-CSDN博客_docker mongodb 挂载
Windows10系统下使用Docker搭建ClickHouse开发环境
Ubuntu
休眠设置合上笔记本盖子不休眠的方法
ubuntu如何对外开放端口
利用Docker搭载C/C++开发环境
使用Docker作为C++开发环境:适用于CLion与VSCode的配置
使用Docker搭建Linuc
C++编译环境
docker安装Ubuntu以及ssh连接
Xshell正版免费,再也不用找破解版了
Docker容器中运行ssh服务
利用Docker和CLion在Mac优雅地开发和调试Linux
C++程序
privileged使用该参数,container内的root拥有真正的root权限
Docker入门教程
Docker中国源
DaoCloud
docker -
apt-get更换国内源解决Dockerfile构建速度过慢
使用Docker搭建Linuc
C++编译环境
利用Docker和CLion在Mac优雅地开发和调试Linux
C++程序
Clion
如何使用 Docker 作为开发环境
Docker
Ubuntu上安装ssh和连接ssh
Windows10系统下使用Docker搭建ClickHouse开发环境
Native
Authenticator
How to set a
multiuser Jupyterlab server with Jupyterhub (in Windows with
Docker)
How
to set a multiuser Jupyterlab server with Jupyterhub (in Windows with
Docker)
利用
jupyterhub 搭建多用户 jupyterlab 开发环境
Ubuntu
挂载新硬盘并把home目录迁移到新硬盘