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

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.
主站蜘蛛池模板: 大方县| 柘城县| 盐山县| 秀山| 蚌埠市| 贵港市| 日喀则市| 镶黄旗| 旬阳县| 馆陶县| 四会市| 西青区| 同江市| 田东县| 娄底市| 常宁市| 纳雍县| 汨罗市| 平乐县| 芦山县| 思南县| 五指山市| 修武县| 洛宁县| 土默特左旗| 芜湖市| 育儿| 林周县| 宜宾市| 临清市| 天气| 汉中市| 高安市| 中卫市| 安阳县| 石屏县| 调兵山市| 衡阳市| 吴忠市| 太原市| 临安市|