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

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.
主站蜘蛛池模板: 兴义市| 安庆市| 双桥区| 玉龙| 桃园县| 囊谦县| 呼玛县| 延庆县| 江阴市| 青田县| 丽水市| 始兴县| 丹江口市| 柞水县| 家居| 米泉市| 黄浦区| 胶州市| 芒康县| 太谷县| 盘锦市| 舒兰市| 湘西| 杨浦区| 北碚区| 根河市| 铜川市| 仁寿县| 乐至县| 凯里市| 万山特区| 汶上县| 龙游县| 乌兰察布市| 吉水县| 尚义县| 永平县| 义马市| 金乡县| 财经| 成武县|