How-To: Install Dapr into your local environment
Prerequisites
- Install Dapr CLI
- Install Docker Desktop
- Windows users ensure that
Docker Desktop For Windows
uses Linux containers.
- Windows users ensure that
Note
By default Dapr is installed with a developer environment using Docker containers to get you started easily. This getting started guide assumes Docker is installed to ensure the best experience. However, Dapr does not depend on Docker to run. Read this page for instructions on installing Dapr locally without Docker using slim init.Initialize Dapr using the CLI
This step installs the latest Dapr Docker containers and setup a developer environment to help you get started easily with Dapr.
- In Linux/MacOS Dapr is initialized with default components and files in
$HOME/.dapr
. - For Windows Dapr is initialized to
%USERPROFILE%\.dapr\
Note
This command downloads and installs Dapr runtime v1.0-rc.1. To install v0.11, the latest release prior to the release candidates for the upcoming v1.0 release, please visit the v0.11 docs.-
Ensure you are in an elevated terminal:
- Linux/MacOS: if you run your docker commands with sudo or the install path is
/usr/local/bin
(default install path), you need to usesudo
- Windows: make sure that you run the command prompt terminal in administrator mode (right click, run as administrator)
- Linux/MacOS: if you run your docker commands with sudo or the install path is
-
Run
dapr init --runtime-version 1.0.0-rc.1
You can install or upgrade to a specific version of the Dapr runtime using
dapr init --runtime-version
. You can find the list of versions in Dapr Release$ dapr init --runtime-version 1.0.0-rc.1 ⌛ Making the jump to hyperspace... Downloading binaries and setting up components ✅ Success! Dapr is up and running. To get started, go here: https://aka.ms/dapr-getting-started
-
Verify Dapr containers are running
From a command prompt run the
docker ps
command and check that thedaprio/dapr
,openzipkin/zipkin
, andredis
container images are running:$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 67bc611a118c daprio/dapr "./placement" About a minute ago Up About a minute 0.0.0.0:6050->50005/tcp dapr_placement 855f87d10249 openzipkin/zipkin "/busybox/sh run.sh" About a minute ago Up About a minute 9410/tcp, 0.0.0.0:9411->9411/tcp dapr_zipkin 71cccdce0e8f redis "docker-entrypoint.s…" About a minute ago Up About a minute 0.0.0.0:6379->6379/tcp dapr_redis
-
Verify Dapr directory has been initialized
-
Linux/MacOS: Run
ls $HOME/.dapr
$ ls $HOME/.dapr bin components config.yaml
-
Windows: Open
%USERPROFILE%\.dapr\
in file explorer
-
Uninstall Dapr in self-hosted mode
This cli command removes the placement Dapr container:
$ dapr uninstall
Warning
This command won’t remove the Redis or Zipkin containers by default, just in case you were using them for other purposes. To remove Redis, Zipkin, Actor Placement container, as well as the default Dapr directory located at $HOME/.dapr
or %USERPROFILE%\.dapr\
, run:
$ dapr uninstall --all
Note
For Linux/MacOS users, if you run your docker cmds with sudo or the install path is/usr/local/bin
(default install path), you need to use sudo dapr uninstall
to remove dapr binaries and/or the containers.