Docker:容器与本地安装 [英] Docker: containers vs local installs

查看:244
本文介绍了Docker:容器与本地安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Docker上周末播放了Docker,并且看到从irssi,mutt,浏览器等所有的小图像,我想知道本地安装的软件包是否正在为数十个容器做出改变? / p>

我可以看到保持基本系统非常干净的好处,并且所有这些容器都是独立的,并且可以轻松地重新定位到不同的桌面,甚至Windows。每个运行一个像阿尔卑斯山这样的小型发行版。 irssi等....



这是事情正在走向还是我在这里丢失船的方式?

解决方案

Jess Frazelle 不会不同意你的意见。

在她身上博客桌面上的Docker容器,她正在集装箱化所有内容。



喜欢 Chrome本身

  $ docker run -it \ 
--net host \\ \\#也可以YOLO
--cpuset-cpus 0 \#控制cpu
--memory 512mb \#max内存,它可以使用
-v /tmp/.X11- unix:/tmp/.X11-unix \#mount X11插座
-e DISPLAY = unix $ DISPLAY \#通过显示
-v $ HOME / Downloads:/ root / Downloads \ #可选,但是
-v $ HOME / .config / google-chrome /:/ data \#如果要保存状态
--device / dev / snd \#所以我们有sound
--name chrome \
jess / chrome

但是Docker容器并不仅限于这种用途,而且主要是为每个容器提供一个服务来表示稳定的,明确且可重现的执行环境的方式,您可以从开发工作站直到生产服务器。


After playing around with Docker for the first time over the week-end and seeing tiny images for everything from irssi, mutt, browsers, etc, I was wondering if local installs of packages are making way for dozens of containers instead?

I can see the benefit in keeping the base system very clean and having all these containers that are all self-contained and could be easily relocated to different desktops, even Windows. Each running a tiny distro like Alpine, with the app e.g. irssi, etc....

Is this the way things are moving towards or am I missing the boat here?

解决方案

Jess Frazelle would not disagree with you.
In her blog post "Docker Containers on the Desktop", she is containerizing everything. Everything.

Like Chrome itself:

$ docker run -it \
    --net host \ # may as well YOLO
    --cpuset-cpus 0 \ # control the cpu
    --memory 512mb \ # max memory it can use
    -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
    -e DISPLAY=unix$DISPLAY \ # pass the display
    -v $HOME/Downloads:/root/Downloads \ # optional, but nice
    -v $HOME/.config/google-chrome/:/data \ # if you want to save state
    --device /dev/snd \ # so we have sound
    --name chrome \
    jess/chrome

But Docker containers are not limited to that usage, and are mainly a way to represent a stable well-defined and reproducible execution environment, for one service per container, that you can use from a development workstation up to a production server.

这篇关于Docker:容器与本地安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆