- 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.
推薦閱讀
- INSTANT Sencha Touch
- 用Flutter極速構建原生應用
- Troubleshooting PostgreSQL
- Java軟件開發基礎
- Visual C++數字圖像處理技術詳解
- Linux命令行與shell腳本編程大全(第4版)
- 深入RabbitMQ
- Linux:Embedded Development
- Java系統化項目開發教程
- Android玩家必備
- RealSenseTM互動開發實戰
- Penetration Testing with the Bash shell
- JavaScript Concurrency
- SCRATCH編程課:我的游戲我做主
- Getting Started with Windows Server Security