docker创建busybox
1. busybox是什么
BusyBox 是一个集成了三百多个最常用Linux命令和工具的软件。BusyBox 包含了一些简单的工具,例如ls、cat和echo等等,还包含了一些更大、更复杂的工具,例grep、find、mount以及telnet。有些人将 BusyBox 称为 Linux 工具里瑞士军刀。简单的说BusyBox就好像是个大工具箱,它集成压缩了 Linux 的许多工具和命令,也包含了 Android 系统的自带的shell。
2. 查询docker上busybox
如下所示为在docker上查询到的busybox镜像列表
docker search busybox
$ docker search busybox
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
busybox Busybox base image. 1667 [OK]
progrium/busybox 70 [OK]
radial/busyboxplus Full-chain, Internet enabled, busybox made f… 25 [OK]
arm32v7/busybox Busybox base image. 7
yauritux/busybox-curl Busybox with CURL 5
armhf/busybox Busybox base image. 5
arm64v8/busybox Busybox base image. 3
aarch64/busybox Busybox base image. 2
p7ppc64/busybox Busybox base image for ppc64. 2
joeshaw/busybox-nonroot Busybox container with non-root user nobody 2
odise/busybox-curl 2 [OK]
prom/busybox Prometheus Busybox Docker base images 2 [OK]
s390x/busybox Busybox base image. 2
armel/busybox Busybox base image. 2
arm32v6/busybox Busybox base image. 2
i386/busybox Busybox base image. 2
sequenceiq/busybox 2 [OK]
spotify/busybox Spotify fork of https://hub.docker.com/_/bus… 1
ppc64le/busybox Busybox base image. 1
arm32v5/busybox Busybox base image. 0
sou856099/busybox 0
trollin/busybox 0
ggtools/busybox-ubuntu Busybox ubuntu version with extra goodies 0 [OK]
amd64/busybox Busybox base image. 0
concourse/busyboxplus 0
3. 查询官方busybox镜像版本
登陆https://hub.docker.com/网站如下所示输入busybox
回车之后出现如下列表,第一个就为官方给出的镜像
点进去即可看到所有的tag信息
4. 下载busybox镜像
docker pull busybox
$ docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
ee153a04d683: Pull complete
Digest: sha256:9f1003c480699be56815db0f8146ad2e22efea85129b5b5983d0e0fb52d9ab70
Status: Downloaded newer image for busybox:latest
docker.io/library/busybox:latest
5. 启动busybox镜像
docker run -it --rm busybox
$ docker run -it --rm busybox
/ # ls
bin dev etc home proc root sys tmp usr var
/ # ll
sh: ll: not found
/ # ls
bin dev etc home proc root sys tmp usr var
/ # ls -l
total 36
drwxr-xr-x 2 root root 12288 Jul 16 01:13 bin
drwxr-xr-x 5 root root 360 Aug 26 14:50 dev
drwxr-xr-x 1 root root 4096 Aug 26 14:50 etc
drwxr-xr-x 2 nobody nogroup 4096 Jul 16 01:13 home
dr-xr-xr-x 224 root root 0 Aug 26 14:50 proc
drwx------ 1 root root 4096 Aug 26 14:50 root
dr-xr-xr-x 13 root root 0 Aug 26 14:50 sys
drwxrwxrwt 2 root root 4096 Jul 16 01:13 tmp
drwxr-xr-x 3 root root 4096 Jul 16 01:13 usr
drwxr-xr-x 4 root root 4096 Jul 16 01:13 var
/ #
6. 查看busybox镜像
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fde052b4f3b5 busybox "sh" About a minute ago Up About a minute dreamy_joliot
镜像正在运行中,我们即可在里面进行初级的linux的指令级相关的学习。
7. 根据dockerfile文件创建busybox
mkdir busybox && cd busyboxtouch Dockerfile
'''
### Dockerfile info
FROM busybox
COPY ./my-static-binary /my-static-binary
CMD ["/my-static-binary"]
'''docker build .
信息打印如下所示
docker build .
Sending build context to Docker daemon 3.072kB
Step 1/3 : from busybox---> db8ee88ad75f
Step 2/3 : COPY ./my-static-binary /my-static-binary---> ff34ed5bb9e8
Step 3/3 : CMD ['./my-static-binary']---> Running in c752a8568332
Removing intermediate container c752a8568332---> e263a3f4e5e6
Successfully built e263a3f4e5e6
参考:https://hub.docker.com/_/busybox
docker创建busybox相关推荐
- Docker创建自己的github(Gitea)
查看全文 http://www.taodudu.cc/news/show-168989.html 相关文章: maven打包导入本地jar包 Spring boot 文件上传大小限制 liunx系统m ...
- Centos7使用Docker创建Oracle11g
Centos7使用Docker创建Oracle11G 实例名(SID ) orcl 管理员帐号 system/admin 字符集 utf-8 端口 1521 首先拉取镜像文件( ...
- 使用 docker 创建自己的镜像
docker run 命令 镜像(image):An image is a filesystem and parameters to use at runtime. It doesn't have s ...
- python认证考试mac_Mac OS 平台使用 Python 和 Docker 创建测试用 Https Server
Mac OS 平台使用 Python 和 Docker 创建测试用 Https Server Flask 是我很喜欢的 Python Web Framework,最近需要测试 Https 通信,需要创 ...
- Docker创建私有仓库
Docker创建私有仓库 1.安装docker docker私有库本身就是一个docker镜像,所以,首先要安装docker,然后启动这个镜像.关于安装docker的过程,参考另外一个文章: 安装do ...
- 使用docker创建属于你的ChatGPT
使用docker创建属于你的ChatGPT 今天来分享一个ChatGPT 网页应用-ChatGPT Next Web,它可以让你随时随地方便使用ChatGPT! 如果想了解更多关于VPS和ChatGP ...
- docker 创建容器时指定容器ip
docker 创建容器时指定容器ip Docker创建容器时默认采用bridge网络,自行分配ip,不允许自己指定. 在实际部署中,我们需要指定容器ip,不允许其自行分配ip,尤其是搭建集群时,固定i ...
- docker创建mysql容器
docker创建mysq容器 1.在docker镜像仓库中搜索mysql镜像 docker search mysql 2.下载镜像 # 1.不指定版本,下载的镜像是最新的 latest版本 docke ...
- Docker创建容器时指定IP
Docker创建容器时指定IP --net extnetwork --ip 172.10.0.2
最新文章
- 自动驾驶中图像与点云融合的深度学习研究进展综述
- 无监督方法实现C++、Java、Python 代码转换,程序员:出了bug怎么办,两种语言都要看吗?...
- 修改模拟器的IMEI号
- WebSockets[翻译]
- MVC中HtmlHelper用法大全
- Linux frame buffer 编程 -- fb基本操作
- 网络流最大流Edmonds-Karp算法(模板)
- ${}和#{}的区别
- 【机器学习基础】终于把XGBoost总结写出来了!
- Oracle 游标的各种写法
- maven 添加本地库
- C++ protected 一种使用场景
- C# CharacterToBinary 将类似2进制字符串 10010110111 转换为数值型源码
- AngularJS内置指令 ng-xxx
- z17mini android 8,努比亚Z17mini和荣耀8哪个好?努比亚Z17mini与华为荣耀8全面区别对比评测...
- ICML(2020)对抗学习论文汇总
- 【ACL2020】五篇与文本理解相关的论文
- linux移动文件 rf参数_北京尚学堂卓越班252天[第095天]—Linux
- PN结、二极管原理详解与应用
- 龙格库塔方法在实际生活中的应用(数值计算Java)