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

  • 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.
主站蜘蛛池模板: 正定县| 朔州市| 洪湖市| 梓潼县| 湖南省| 信丰县| 英吉沙县| 防城港市| 平舆县| 安泽县| 巩留县| 岳池县| 灵川县| 盘山县| 禄丰县| 平潭县| 山阳县| 调兵山市| 姚安县| 大化| 文水县| 漯河市| 民乐县| 镇江市| 宜昌市| 南阳市| 宿松县| 三明市| 南木林县| 和顺县| 福海县| 澄江县| 勐海县| 利川市| 广丰县| 长宁县| 揭西县| 兴安县| 济南市| 聂荣县| 德钦县|