# Install on macOS and Windows with Docker

Aerospike Database runs natively on 64-bit Linux, and with Docker you can also deploy Aerospike on macOS and Windows. Aerospike provides container images for x86\_64 processors and 64-bit ARM (Apple M series) processors.

## Install with AeroLab

Use [AeroLab](https://github.com/aerospike/aerolab/blob/master/README.md) to create Aerospike development and testing clusters locally in Docker, or remotely on AWS or Google Cloud.

To install with AeroLab, perform the following steps:

1.  Install AeroLab as described in [Getting started with AeroLab](https://github.com/aerospike/aerolab/blob/master/docs/GETTING_STARTED.md).
    
2.  To install a cluster and try out the new transactions feature of Aerospike Database 8.0.0, enter the following commands:
    
    Terminal
    
    ```bash
    aerolab config backend -t docker
    
    aerolab cluster create -f features.conf
    
    aerolab conf sc
    ```
    
    The default [consistency mode](https://aerospike.com/docs/database/8.1.0/learn/architecture/clustering/consistency-modes) in Aerospike Database is AP. AeroLab’s `conf sc` command enables strong-consistency mode.
    

## Install with Docker Desktop

Docker Desktop is a convenient way to run the containers. After you have installed Docker Desktop, launch it and execute the following steps.

1.  Pull the Docker image. For this example, we use Aerospike Database Enterprise Edition (EE) because it allows a single-node cluster with all enterprise features for evaluation. See [Features and Editions](https://aerospike.com/products/features-and-editions/) for more information.
    
    Terminal
    
    ```bash
    docker pull aerospike/aerospike-server-enterprise
    ```
    
    If you prefer to use the Community Edition (CE), use `aerospike/aerospike-server` as the source for the pull.
    
2.  Start the Aerospike container.
    
    Terminal
    
    ```bash
    docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-enterprise
    ```
    
    Enterprise Edition’s evaluation features are unlocked in its included [feature-key file](https://aerospike.com/docs/database/8.1.0/manage/planning/feature-key). If you have your own feature-key file, set an environment variable with the location of the file and pass it to the Docker image:
    
    Terminal
    
    ```bash
    export FEATKEY=$(base64 -i ~/evaluation-features.conf)
    
    docker run -d -e "FEATURES=$FEATKEY" -e "FEATURE_KEY_FILE=env-b64:FEATURES" --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-enterprise
    ```
    
    -   `-d` runs the container in detached mode.
    -   `--name` assigns a name to the container.
    -   `-e "FEATURES=$FEATKEY"` sets a container-side environment variable `FEATURES` with the base64-encoded feature-key file.
    -   `-e "FEATURE_KEY_FILE=env-b64:FEATURES"` sets the [`feature-key-file`](https://aerospike.com/docs/database/reference/config#service__feature-key-file) configuration parameter to the value of the container-side variable `FEATURES`.
    -   `-p` maps ports 3000, 3001, and 3002 of the host machine to ports 3000, 3001, and 3002 inside the Docker container, respectively.
    -   `aerospike/aerospike-server-enterprise` specifies the name of the image.
    
    See the [Docker run reference](https://docs.docker.com/engine/reference/run/) for more information on the Docker parameters.
    
    For more information on the Aerospike EE image, see [aerospike/aerospike-server-enterprise](https://hub.docker.com/r/aerospike/aerospike-server-enterprise) on Docker Hub.
    
3.  Verify that the container is running:
    
    Run `docker ps` to show all running containers. Its output should resemble the following:
    
    Terminal output
    
    ```console
    CONTAINER ID   IMAGE                                   COMMAND                  CREATED          STATUS          PORTS                              NAMES
    
    c8456f7dd252   aerospike/aerospike-server-enterprise   "/usr/bin/dumb-init …"   21 seconds ago   Up 15 seconds   0.0.0.0:3000-3002->3000-3002/tcp   aerospike
    ```
    

### Test your Docker installation

Before you start developing clients, use [Aerospike Quick Look (AQL)](https://aerospike.com/docs/database/tools/aql), Aerospike’s command-line data browser, to insert and read records to verify that the database is running.

1.  Run the following command to install and run the Aerospike tools container image and AQL tool:
    
    Terminal
    
    ```bash
    docker run -it aerospike/aerospike-tools aql -h  $(docker inspect -f '{{.NetworkSettings.IPAddress}}' aerospike)
    ```
    
    The command invokes `aql` in the `aerospike/aerospike-tools container`, providing AQL’s `-h` option with the IP address of the Aerospike Database container with the `docker inspect` command.
    
    After you run the command, the `aql` command prompt appears.
    
2.  Run the following example commands to create some new records in the default namespace _test_ and a new set _birds_. In this example, we log bird sightings and their locations.
    
    ::: note
    AQL does not require a semicolon to terminate a single command, but you can use semicolons to combine multiple commands. The following example executes three record inserts in a single terminal command.
    :::
    
    AQL
    
    ```sql
    insert into test.birds (PK, species, location) values (1, 'scrub jay', 'Mountain View');
    
    insert into test.birds (PK, species) values (2, 'seagull');
    
    insert into test.birds (PK, location, species) values (3, 'Palo Alto', 'snowy plover')
    ```
    
3.  Query the database:
    
    AQL
    
    ```sql
    select * from test.birds
    ```
    
    AQL output
    
    AQL output
    
    ```console
    +----+-----------------+----------------+
    
    | PK | location        | species        |
    
    +----+-----------------+----------------+
    
    | 3  | "Palo Alto"     | "snowy plover" |
    
    | 2  |                 | "seagull"      |
    
    | 1  | "Mountain View" | "scrub jay"    |
    
    +----+-----------------+----------------+
    
    3 rows in set (0.049 secs)
    ```
    

### Create a shared directory (optional)

`/opt/aerospike/etc` is the default location for files in the Docker container. Although not required, creating the same directory on your local system can make it easier to keep track of the files.

1.  Create the `/opt/aerospike/etc` directory on your local machine.
2.  Start Docker Desktop.
3.  Click the **Settings** gear icon in the upper right corner of the window.
4.  Click **Resources**, then click **File sharing** in the sidebar.
5.  In the **Virtual file shares** section, add `/opt/aerospike/etc` to the empty folder path at the bottom of the list of shared folders.
6.  Click the plus icon to the right of the new folder path.
7.  Click **Apply & restart**.