- 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:
- 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.
- 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
- 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.
推薦閱讀
- Oracle從新手到高手
- C++面向?qū)ο蟪绦蛟O(shè)計(jì)(微課版)
- 深入淺出Prometheus:原理、應(yīng)用、源碼與拓展詳解
- Learning ASP.NET Core 2.0
- 人人都是網(wǎng)站分析師:從分析師的視角理解網(wǎng)站和解讀數(shù)據(jù)
- Bootstrap 4:Responsive Web Design
- Mastering Ext JS
- JavaScript:Moving to ES2015
- JavaCAPS基礎(chǔ)、應(yīng)用與案例
- .NET 4.5 Parallel Extensions Cookbook
- Java并發(fā)編程之美
- Programming Microsoft Dynamics? NAV 2015
- Laravel Application Development Blueprints
- 并行編程方法與優(yōu)化實(shí)踐
- Mastering HTML5 Forms