> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Customize your Environment

You can customize an environment to enable tools, run scripts, or manage environment variables. You may need to be an administrator to edit an existing environment.

* Click **Customize before Building** if you just created an Environment and want to enable tools, run scripts, or manage environment variables.

* To edit an existing Environment, go to **Govern** > **Environments** in the navigation pane and click the name of an Environment. Then click **Edit Definition**.

## Order of script execution

Domino runs setup scripts before and after running the `requirements.txt` file. The scripts within an environment are executed in the following order:

* First, it executes **pre-setup scripts**.

* Next, it installs packages from the `requirements.txt` file.

* Then Domino runs **post-setup** and **pre-run scripts**.

* **Post-run scripts** are executed after your Workspace, Job, or App is stopped.

However, no scripts are run before or after tasks in a distributed compute cluster environment, such as Spark, Ray, Dask, or MPI.

## Define your environment

Before you add items to these scripts and the `requirements.txt` file, think about whether similar instructions should be included directly in the environment’s Dockerfile.

This can make it faster to start workspaces, jobs, and other tasks using the environment because the necessary work is already included in the Docker image.

<img src="https://mintcdn.com/dominodatalab-e871cec4/LnFGSZ2o5jkxCrWN/images/6.1/admin-guide/domino-environment-subscribed.png?fit=max&auto=format&n=LnFGSZ2o5jkxCrWN&q=85&s=c612996f6f0514ea749a7ba3c1d015c9" alt="Domino Environment Overview Tab" width="660" height="318" data-path="images/6.1/admin-guide/domino-environment-subscribed.png" />

You can start by going to **Govern** > **Environments** and selecting the environment you want to define from the list. Then click **Edit Definition**.

On the **Overview** tab, you can update the **Description** or change the environment’s Visibility. You won’t be able to change the **Environment Base** or **Supported Cluster Settings**.

### Dockerfile instructions

Enter your Dockerfile layers. Some things to remember:

* Exclude the `FROM` statement.

* Commands can be run as root or other user available in the base image.

* Docker can’t access your project files or user environment variables when building.

* There is a limit of 127 layers.

[Docker’s official site](https://docs.docker.com/engine/reference/builder/) has more detailed information about Docker.

### Pluggable workspace tools

Enter the interactive tools needed by any Project that uses this Environment. [Add Workspace IDEs](/cloud/platform-capabilities/core-concepts/compute-environments/work-with-pluggable-workspaces/add-workspace-ides) has more information about interactive tools.

### Run setup scripts

Enter the `bash` code that is executed at runtime. Domino executes these commands at runtime and runs them as root.

* **Pre Run Script**: Enter commands to execute before the Python packages in your Project’s `requirements.txt` are installed.

* **Post Run Script**: Enter commands to execute after your Workspace/Job/App is stopped.

### Environment variables

Set the **Variable Names** and their **Values**.

### Advanced

In the advanced section, enter the `bash` code executed at a specified step in your experiment’s lifecycle.

* **Pre Run Script**: Enter commands to execute before installing Python packages in your Project’s `requirements.txt`.

* **Post Run Script**: Enter commands to execute after the Python packages in your Project’s `requirements.txt` are installed.

* **Enable VPN Networking**: Select this if a VPN is to be used for that environment.

### Revision History

Enter a short description of the changes to the Environment.

## Next steps

* [Our Best Practices](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/1-best-practices-domino-environments) will guide you in setting up and maintaining your Domino environments.

* [Use Domino’s environment variables](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables) to store keys and credentials or to inject values into your runs.

* [Create a Domino Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/3-create-an-environment) using an existing environment or start from a custom setup.

* [Set default Environments](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/6-set-a-default-environment) establishes a starting point for all new projects or an environment for a specific project.
