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

  • 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.
主站蜘蛛池模板: 同心县| 和政县| 灵丘县| 阳朔县| 苍溪县| 澎湖县| 深泽县| 凌海市| 甘谷县| 瓮安县| 乌苏市| 凤冈县| 北宁市| 长丰县| 都昌县| 和平县| 宝鸡市| 乃东县| 梁河县| 加查县| 平泉县| 泸溪县| 苍溪县| 太保市| 汝阳县| 申扎县| 谢通门县| 东台市| 惠东县| 垣曲县| 昆山市| 阿鲁科尔沁旗| 南川市| 林周县| 潜山县| 罗平县| 象山县| 秦安县| 吴江市| 田东县| 河北省|