Install Unity Accelerator with Docker Hub
Instructions for installing Unity Accelerator with Docker Hub.
読み終わるまでの所要時間 3 分最終更新 1ヶ月前
You can use Docker Hub to install Unity Accelerator with the following link: https://hub.docker.com/r/unity/accelerator
Set up persistent storage
To host Unity Accelerator's configuration and cache, you must set up a persistent storage area. To set this up, use one or more of the following variables when running the container for the first time. The variables are only used if the startup doesn't find a configuration file so it's safe to run with them on successive runs.
Variable | Description |
|---|---|
| Set to true to disable usage stats. Leaving usage stats enabled can help improve Unity Accelerator's features and performance by giving Unity feedback. |
| The username for the local built-in dashboard. |
| The password for the local built-in dashboard. |
| The host name to use for TLS support. This is used for redirects and goes along with |
| The path to a cert.pem to use for TLS support. If you set |
| The path to a key.pem to use for TLS support. If you set |
Configure security and TLS
To configure TLS settings, ensure the cert.pem and key.pem is in the /agent path specified and then include a like the following:
CERT_HOSTNAME$ docker run --rm -ti -v "${PWD}/agent:/agent" -e 'CERT_HOSTNAME=myhostname.com' -e unity/accelerator:latest
Subsequent execution
You can also set any environment variables for the cache server. Use and look for options that indicate . There are two that the container sets if you don't:
unity-accelerator --all-helpDefault: $SOME_VARIABLEVariable | Description |
|---|---|
| Container default is /agent. This is the directory where unity-accelerator.cfg resides as well as other persisted data ( |
| Container default is true. When true, outputs logs to |
Run the container
Unity's Docker images are signed, so it's best practice to enable Docker Content Trust:
$ export DOCKER_CONTENT_TRUST=1
You can run Unity Accelerator with the following:
$ docker run -p 80:80 -p 443:443 -p 10080:10080 -v "${PWD}/agent:/agent" unity/accelerator:latest
However, If you want to choose a different location for where Unity Accelerator stores the configuration and cached artifacts, you can choose to provide additional environment variable configuration values like this:
$ docker run -p 80:80 -p 443:443 -p 10080:10080 -v "${PWD}/agent:/mnt/another_spot" -e "UNITY_ACCELERATOR_PERSIST=/mnt/another_spot" -e "UNITY_ACCELERATOR_DEBUG=true" unity/accelerator:latest
To set a username and password for local dashboard, you can use and environment variables:
USERPASSWORD$ docker run -p 80:80 --env PASSWORD=[PASSWORD] --env USER=[USERNAME] unity/accelerator:latest
Exposed ports
The following are the default values for ports used by Unity Accelerator:
- 80
- 443
- 10080
- 10443