# Vary Course

## Install Vary with Docker

Get Vary running locally with Docker, verify the compiler, and run a first file from your working directory.

### Docker setup

#### Confirm Docker works

Check that Docker is installed before pulling the Vary image.

```bash
docker --version

```

Run: `docker --version`

Expected output:

```text
^Docker version [0-9]+\.[0-9]+\.[0-9]+, build [0-9a-f]+$
```

#### Create the Vary Docker alias

Create a local `vary` command that runs the compiler container in your current directory.

```bash
alias vary='docker run --rm \
  -u "$(id -u):$(id -g)" \
  -v "$(pwd):/workspace" \
  -w /workspace \
  ghcr.io/ccollicutt/vary:latest'
vary --version

```

Run: `vary --version`

Expected output:

```text
^Vary v[0-9]+-alpha\.[0-9]+ .+$
```

#### Run a Vary file through Docker

Print the working directory and verify it is the container's `/workspace` mount.

```vary
import system

let here: Str = system.cwd().to_str()
print("cwd=" + here)

```

Run: `vary run main.vary`

Expected output:

```text
cwd=/workspace
```

