官术网_书友最值得收藏!

  • DevOps with Kubernetes
  • Hideto Saito Hui Chuan Chloe Lee Cheng Yang Wu
  • 217字
  • 2021-07-02 13:41:48

Installing Docker for macOS

Docker wraps a micro Linux with the hypervisor framework to build a native application on macOS, which means we don't need third-party virtualization tools to use Docker on a Mac. To benefit from the hypervisor framework, you must upgrade your macOS to version 10.10.3 or more:

  1. Download the Docker package and install it: https://download.docker.com/mac/stable/Docker.dmg.
Docker for Windows requires no third-party tools either. Check for the installation guide at the following link: https://docs.docker.com/docker-for-windows/install.
  1. You're now in Docker. Try creating and running your very first Docker container. Run the command with sudo if you're on Linux:
$ docker run alpine ls
bin dev etc home lib media mnt proc root run sbin srv sys tmp usr var
  1. You'll see that you're under a root directory instead of your current one. Let's check the process list again:
$ docker run alpine ps aux
PID USER TIME COMMAND
1 root 0:00 ps aux

It's isolated, as expected. You're now all ready to work with the container.

Alpine is a Linux distribution. Since it's really small in size, many people use it as their base image to build their application container. Do note, however, that it still has a few differences from mainstream Linux distributions. For example, Alpine uses musl libc, while most distributions use glibc.
主站蜘蛛池模板: 泸定县| 渭南市| 石门县| 灌云县| 西丰县| 岢岚县| 莫力| 昭觉县| 舒兰市| 大连市| 山西省| 军事| 龙南县| 太湖县| 策勒县| 临澧县| 肇源县| 金堂县| 沧州市| 习水县| 鄂托克前旗| 广平县| 大冶市| 中卫市| 罗山县| 湖北省| 巴中市| 三江| 青浦区| 文昌市| 陆良县| 绿春县| 什邡市| 武定县| 酒泉市| 突泉县| 扬中市| 孟津县| 通许县| 珲春市| 南川市|