【云原生-Docker】Ubuntu镜像设置及docker安装

简介: 【云原生-Docker】Ubuntu镜像设置及docker安装

Ubuntu镜像


简介

Ubuntu,是一款基于Debian Linux的以桌面应用为主的操作系统,内容涵盖文字处理、电子邮件、软件开发工具和Web服务等,可供用户免费下载、使用和分享。

地址:https://mirrors.aliyun.com/ubuntu/


镜像源设置


编辑该文件 /etc/apt/sources.list

替换 sources.list 为一下内容【根据不同版本选择】

ubuntu 18

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

ubuntu 20

deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

更新源地址


sudo apt-get update

相关仓库


Ubuntu安装源(ubuntu-releases): https://developer.aliyun.com/mirror/ubuntu-releases

Ubuntu ARM源(ubuntu-ports): https://developer.aliyun.com/mirror/ubuntu-ports

Ubuntu过期源(oldubuntu-releases): https://developer.aliyun.com/mirror/oldubuntu-releases

Ubuntu其他架构安装镜像(ubuntu-cdimage): https://developer.aliyun.com/mirror/ubuntu-cdimage


ubuntu安装docker


安装docker:sudo apt-get install -y docker.io


启动docker服务:systemctl start docker


设置开机启动:systemctl enable docker


查看docker状态:systemctl status docker


停止docker服务:systemctl stop docker


查看docker版本:docker version

相关文章
|
22小时前
|
缓存 Docker 容器
在Docker中,docker commit生成的镜像和dockerfile生成镜像有什么区别?
在Docker中,docker commit生成的镜像和dockerfile生成镜像有什么区别?
|
1天前
|
缓存 开发者 Docker
Dockerfile是Docker容器化过程中的核心组件,它允许开发者以一种可重复、可移植的方式自动化地构建Docker镜像
【8月更文挑战第19天】Dockerfile是构建Docker镜像的脚本文件,含一系列指令定义镜像构建步骤。每条大写指令后跟至少一个参数,按序执行,每执行一条指令即生成新的镜像层。常用指令包括:FROM指定基础镜像;RUN执行构建命令;EXPOSE开放端口;CMD指定容器启动行为等。优化策略涉及减少镜像层数、选择轻量基础镜像、利用缓存及清理冗余文件。示例:基于Python应用的Dockerfile包括设置工作目录、复制文件、安装依赖等步骤。掌握Dockerfile有助于高效自动化构建镜像,加速应用部署。
|
19小时前
|
存储 Linux Docker
在Docker中,如何更改Docker的默认存储设置?
在Docker中,如何更改Docker的默认存储设置?
|
19小时前
|
缓存 运维 安全
在Docker中,构建镜像应该遵循哪些原则?
在Docker中,构建镜像应该遵循哪些原则?
|
19小时前
|
Docker 容器
在Docker中,如何批量清理临时镜像文件?
在Docker中,如何批量清理临时镜像文件?
|
19小时前
|
存储 Ubuntu 应用服务中间件
在Docker中,怎么快速查看本地的镜像和容器?
在Docker中,怎么快速查看本地的镜像和容器?
|
19小时前
|
JSON Shell 数据格式
在Docker中,如何查看镜像支持的环境变量?
在Docker中,如何查看镜像支持的环境变量?
|
19小时前
|
Shell Docker 容器
在Docker中,如何退出一个镜像的bash,而不终止它?
在Docker中,如何退出一个镜像的bash,而不终止它?
|
22小时前
|
安全 Ubuntu Linux
在Docker中,镜像内没有curl,kill,ipconfig等指令如何添加?
在Docker中,镜像内没有curl,kill,ipconfig等指令如何添加?
|
1天前
|
Ubuntu
Ubuntu使用apt安装opengl
Ubuntu使用apt安装opengl

热门文章

最新文章