You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Mac系统下如何通过命令行启动Docker Desktop?

How to Start Docker Desktop via Command Line on Mac

Got it, I totally get the frustration of digging through Applications to launch Docker every time—here's how you can fire it up straight from your terminal:

  • Basic command to launch Docker Desktop
    Use macOS's built-in open tool to kick off the GUI app. Run this command:

    open -a Docker
    

    This works exactly like double-clicking the Docker icon in your Applications folder. You'll see the Docker menu bar icon pop up once it's ready, and you can immediately run any docker commands afterward.

  • Launch Docker Desktop quietly in the background
    If you don't want the main Docker Desktop window to pop open when starting it, add the -g (background) and -j (minimize to Dock) flags:

    open -gj Docker
    

    Docker will run silently in the background, with only the menu bar icon indicating it's active.

  • Check if Docker is running properly
    To confirm the Docker daemon is up and ready to accept commands, run:

    docker info
    

    If you get a detailed output about your Docker setup instead of an error message, you're all set to use Docker via the command line.

内容的提问来源于stack exchange,提问作者Shobi

火山引擎 最新活动