# Build Arguments

{% hint style="info" %}
This functionality requires at least [auterion-app-api 3](/app-development/app-framework/app-framework-1.md) to be available
{% endhint %}

You may specify build-time arguments in the **auterion-app.yml** file using the `build-args` keyword:

{% code title="auterion-app.yml" %}

```yaml
services:
  test-app: 
    ssh: true
    build: .
    build-args:
      BAR: ${FOO}
```

{% endcode %}

The environment variable `FOO` and the docker build argument `BAR` can then be defined in the environment where auterion-cli is executed, for example:

```bash
# This will assign "123" to the BAR variable in the Dockerfile
FOO="123" auterion-cli app build
```

Alternatively the environment variable can be defined in a top-level `.env` file in the app directory:

{% code title=".env" %}

```yaml
# This will also assign "123" to the BAR variable in the Dockerfile
FOO="123"
```

{% endcode %}

{% hint style="info" %}
Note that environment variables defined from the command line will overwrite the variables already defined in the `.env` file.
{% endhint %}

The `BAR` docker build argument can then be used at build-time from your **Dockerfile**:

{% code title="Dockerfile" %}

```docker
FROM auterion/app-base:v2

ARG BAR
RUN echo "My docker build arg is ${BAR}"
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.auterion.com/app-development/app-framework/build-arguments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
