docker搭建容器过程

2023-05-16

docker 环境创建

配置apt国内镜像源

  • 备份源
cp /etc/apt/sources.list /etc/apt/sources.list_backup
vim /etc/apt/sources.list

备注:ggVG全选中,按下dd即可清除内容

编辑内容:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

如果出现vim不可用,可使用echo

echo 'deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse' > /etc/apt/sources.list
echo 'deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse'  >> /etc/apt/sources.list
echo 'deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse'  >> /etc/apt/sources.list
echo 'deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse' > /etc/apt/sources.list

echo 'deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse' >> /etc/apt/sources.list

echo 'deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse' >> /etc/apt/sources.list

echo 'deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse' >> /etc/apt/sources.list

echo 'deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse' >> /etc/apt/sources.list

echo 'deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse' >> /etc/apt/sources.list

echo 'deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse' >> /etc/apt/sources.list

echo 'deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse' >> /etc/apt/sources.list

echo 'deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse' >> /etc/apt/sources.list

echo 'deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse' >> /etc/apt/sources.list
  • 更新列表
apt-get update

ssh 远程连接

apt-get install openssh-server

遇到问题:

 Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:	
The following packages have unmet dependencies:
 openssh-server : Depends: openssh-client (= 1:7.6p1-4ubuntu0.4) but 1:8.2p1-4ubuntu0.1 is to be installed
                  Depends: openssh-sftp-server but it is not going to be installed
                  Recommends: libpam-systemd but it is not going to be installed
                  Recommends: ncurses-term but it is not going to be installed
                  Recommends: xauth but it is not going to be installed
                  Recommends: ssh-import-id but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

解决方案:

下载对应的客户端

apt-get install openssh-client=1:7.6p1-4ubuntu0.4
  • 启动ssh
/etc/init.d/ssh restart
  • 配置ssh远程登录
vim /etc/ssh/sshd_config

设置

PermitRootLogin yes
  • 重启ssh
/etc/init.d/ssh restart
  • 问题:ImportError: libGL.so.1: cannot open shared object file: No such file or directory
apt install libgl1-mesa-glx

问题:apt更新签名问题
Get:1 http://mirrors.aliyun.com/ubuntu bionic InRelease [242 kB]
Err:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
Couldn’t create temporary file /tmp/apt.conf.51Jnba for passing config to apt-key
Get:2 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease [74.6 kB]
Err:2 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
Couldn’t create temporary file /tmp/apt.conf.I69fNe for passing config to apt-key
Get:3 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease [242 kB]
Err:3 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease
Couldn’t create temporary file /tmp/apt.conf.4BqRgj for passing config to apt-key
Get:4 http://mirrors.aliyun.com/ubuntu bionic-security InRelease [88.7 kB]
Err:4 http://mirrors.aliyun.com/ubuntu bionic-security InRelease
Couldn’t create temporary file /tmp/apt.conf.F6OLEo for passing config to apt-key
Get:5 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease [88.7 kB]
Err:5 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
Couldn’t create temporary file /tmp/apt.conf.qNuAzr for passing config to apt-key
Reading package lists… Done
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic InRelease: Couldn’t create temporary file /tmp/apt.conf.51Jnba for passing config to apt-key
E: The repository ‘http://mirrors.aliyun.com/ubuntu bionic InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic-backports InRelease: Couldn’t create temporary file /tmp/apt.conf.I69fNe for passing config to apt-key
E: The repository ‘http://mirrors.aliyun.com/ubuntu bionic-backports InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease: Couldn’t create temporary file /tmp/apt.conf.4BqRgj for passing config to apt-key
E: The repository ‘http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic-security InRelease: Couldn’t create temporary file /tmp/apt.conf.F6OLEo for passing config to apt-key
E: The repository ‘http://mirrors.aliyun.com/ubuntu bionic-security InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic-updates InRelease: Couldn’t create temporary file /tmp/apt.conf.qNuAzr for passing config to apt-key
E: The repository ‘http://mirrors.aliyun.com/ubuntu bionic-updates InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
解决方案:

chmod 777 /tmp

参考:https://bbs.huaweicloud.com/blogs/308763

问题:ERROR: Could not build wheels for pycuda which use PEP 517 and cannot be installed directly
解决方案:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pycuda --no-binary :all:

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

docker搭建容器过程 的相关文章

随机推荐

  • 视觉SLAM入门十四讲

    视觉SLAM入门十四讲 写在前面的话什么是视觉SLAM视觉SLAM中所使用的摄像头传感器单目摄像头双目摄像头深度摄像头 经典视觉SLAM框架 写在前面的话 考研期间迷上了SLAM xff0c 买来了高翔 张涛等著的 视觉SLAM十四讲 从理
  • px4源码编译指南

    px4源码编译指南 强烈推荐大家去看官网的英文文档 xff0c 国内的博客杂七杂八 xff0c 官网的中文也很久没有更新 xff0c 这几天自己踩了很多坑 xff0c 写个教程希望能帮助到大家 xff08 本文选用平台是pixhawk1 1
  • 敏捷开发:做一个合格的Scrum Master

    图片来源于网络 Scrum Master Beauty and Beast 在Scrum敏捷开发中有三种主要的角色 xff1a Product Owner xff08 产品负责人 xff0c 简称 34 PO 34 xff09 Scrum
  • 嵌入式软件:通过串口进行调试的一些思考和实践

    最近的工作还是改那坨代码 维护这摊东西也快要2年了 xff0c 好几次想重构它 xff0c 顺便整理一下 xff0c 不过我还是缺乏那种毅力 在这段时间里我还加了一些功能模块 xff0c 估计如果以后有新人接手这摊东西 xff0c 会抱怨这
  • 串口调试助手没有显示

    用cubeMX生成工程之后 xff0c 笔者写了下面两句话 xff08 向串口发送一个字符串 xff09 xff1a 但是 xff0c 打开调试工具怎么也接受不到数据 xff0c 魔术棒里面的 芯片型号 xff0c 调试 xff08 J L
  • vscode使用gitee

    vscode使用gitee 首先选择文件夹右键用vscode打开 然后打开vscode的终端 xff1a 在终端输入命令 xff1a xff08 每行命令输入完成之后记得敲回车 xff09 xff1a git init然后敲回车就有 xff
  • 深度揭秘阿里(蚂蚁金服)技术面试流程!附前期准备,学习方向

    上半年公司的项目很闲 xff0c 很多人觉得没意思陆续走了 xff0c 我考虑到自己的发展 xff0c 从6月底开始面 xff0c 面到7月底 xff0c 三十家公司 我从不打没准备的仗 xff0c 我是一个喜欢总结经验的人 xff0c 每
  • Git 中submodule的使用,终于有人说明白了

    背景 面对比较复杂的项目 xff0c 我们有可能会将代码根据功能拆解成不同的子模块 主项目对子模块有依赖关系 xff0c 却又并不关心子模块的内部开发流程细节 这种情况下 xff0c 通常不会把所有源码都放在同一个 Git 仓库中 有一种比
  • git 工具GitEye使用

    二 xff1a 签入 右键commit 可以选择需要签入的 xff0c 要加入注释才能签入 一 xff1a 比较
  • ROS笔记十(基于Python、Kinetic):rviz基础——快速配置并渲染点云和摄像机图像数据

    前言 xff1a rviz xff08 ROS visualization xff09 xff1a 用于机器人 传感器和算法的通用3D可视化系统 rviz能够绘制多种类型的数据流 特别是三维的数据 在ROS中所有类型的数据都被关联到一个参考
  • java面试必看书单

    编程之法 https legacy gitbook com book wizardforcel the art of programming by july details 白话经典算法之七大排序 链接 xff1a https pan ba
  • Java基础 - Integer和int的区别

    一 int和Integer的区别 两者的区别主要体现在以下几个方面 xff1a 1 数据类型不同 xff1a int 是基础数据类型 xff0c 而 Integer 是包装数据类型 xff1b 2 默认值不同 xff1a int 的默认值是
  • Lua + GraphicsMagick安装

    Lua 43 GraphicsMagick安装 图片的实时缩放功能是Nginx调用Lua脚本 xff0c Lua脚本在FastDFS中下载对应的图片保存到本地 xff0c 然后Lua调用GraphicsMagick实现图片的缩放功能 1 安
  • 零基础应该选择学习 C、C++、Java、python、web前端、C#、PHP、Linux选哪个编程语言好呢?

    众多的语言 xff0c 到底哪一门才是适合我呢 xff1f 小白 xff1a 大佬 xff0c 大佬 xff0c 编程语言也太多了 xff0c 到底我应该选择哪一种呢 xff1f 大佬 xff1a 首先呢 xff0c 我们先对常见的编程语言
  • 如何看英文技术文档

    https www jianshu com p af7d39cac6b8
  • 从工具的奴隶到工具的主人

    摘要 xff1a 我们每个人都是工具的奴隶 随着我们的学习 xff0c 我们不断的加深自己对工具的认识 xff0c 从而从它们里面解脱出来 现在我就来说一下我作为各种工具的奴隶 xff0c 以及逐渐摆脱它们的思想控制的历史吧 当我高中毕业进
  • 程序员,这四个学习建议值得收藏

    大家好 xff0c 我是本周的值班编辑 江南一点雨 xff0c 本周将由我为大家排版并送出技术干货 xff0c 大家可以在公众号后台回复 springboot xff0c 获取最新版 Spring Boot2 1 6 视频教程试看 在我看来
  • 底层原理解析

    目录 HashMap底层原理 xff1a ConcurrentHashMap 底层原理 HashMap底层原理 xff1a 1 HashMap概述 xff1a HashMap是一个散列桶 xff08 数组和链表 xff09 xff0c 它存
  • Java ServerSocket & Socket 实现 单组【客户端⇄服务端】双工通信(双向通信)

    Server java 服务器端开启服务 package com example socket service import lombok SneakyThrows import java net ServerSocket import j
  • docker搭建容器过程

    docker 环境创建 配置apt国内镜像源 备份源 span class token function cp span etc apt sources list etc apt sources list backup span class