首页 > 其他 > 详细

安装操作系统

时间:2020-01-28 10:53:52      阅读:316      评论:0      收藏:0      [点我收藏+]

一、BusyBox

1.1 BusyBox简介

集成了一百多个最常用的Linux命令的镜像,不到2M,短小精悍我喜欢。

1.2 获取镜像

$docker search busybox

官方下完1.22M

$docker pull busybox:latest

1.3 运行busybox

运行之后会进入如下所示,可以直接输入命令,exit退出

[root@localhost test]# docker run -it busybox
WARNING: IPv4 forwarding is disabled. Networking will not work.
/ #

二、Alpine

1.1 Alpine简介

一个面向安全的轻量级linux操作系统,大小5M左右,占用资源小,自带BusyBox跟包管理工具apk等。

1.2 获取镜像

因为小所以爱可以直接运行自动下载

$docker run alpine echo ‘我很小’

用time查看下载运行需要多久

技术分享图片
[root@localhost test]# time docker run alpine echo "我很小"
Unable to find image ‘alpine:latest‘ locally
latest: Pulling from library/alpine
Image docker.io/library/alpine:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
c9b1b535fdd9: Already exists
Digest: sha256:ccf1a7a4018644cdc8e1d50419bbccb08d8350109e6c2e757eef87ee2629828a
Status: Downloaded newer image for alpine:latest
WARNING: IPv4 forwarding is disabled. Networking will not work.
我很小

real    0m1.583s
user    0m0.032s
sys     0m0.056s
View Code

运行界面跟busybox一样

1.3 迁移至Alpine基础镜像

安装操作系统

原文:https://www.cnblogs.com/tz90/p/12237502.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!