Deploying with docker run
The docker run
command creates and starts a container in one step. Instantly.run supports mounting up to two named volumes—ssd
and/or hdd
—to arbitrary paths in your container, setting domains, environment variables, and port mappings.
Syntax
instantly run [OPTIONS] IMAGE [COMMAND...]
Key options
--name <name>
: Give your container a human-readable name.--domainname <domain>
: Expose HTTP publicly at this domain (e.g.crm.example.com
).- If omitted, we generate
<name>-<tenant>.app.instantly.run
(e.g.blog-instantly.app.instantly.run
).
- If omitted, we generate
-p 80:<port>
: Map our public port 80 to your container’s HTTP port (defaults to 80).--volume ssd:/path/in/container
: Mount thessd
volume.--volume hdd:/path/in/container
: Mount thehdd
volume.-e KEY=VALUE
: Set environment variables.-d
: Run detached (in the background).-it
: Run interactively with a TTY.
WordPress Example
Let’s deploy WordPress with MariaDB. First, start the database:
instantly run -d --name mariadb \
--domainname crm-db.instantly.run \
-p 3306:3306 \
--env MARIADB_USER=instantly \
--env MARIADB_PASSWORD=instantly \
--env MARIADB_DATABASE=instantly \
--env MARIADB_ROOT_PASSWORD=instantly \
mariadb:latest
Next, launch WordPress:
instantly run -d --name wordpress \
--domainname crm.instantly.run \
-p 80:8080 \
--volume ssd:/bitnami/wordpress \
-e WORDPRESS_ENABLE_HTTPS=yes \
-e WORDPRESS_DATABASE_HOST=crm-db-instantly-run.instantly-tenants \
-e WORDPRESS_DATABASE_USER=instantly \
-e WORDPRESS_DATABASE_PASSWORD=instantly \
-e WORDPRESS_DATABASE_NAME=instantly \
-e WORDPRESS_USERNAME=courtney \
-e WORDPRESS_PASSWORD=pass1 \
-e WORDPRESS_BLOG_NAME='Instantly' \
bitnami/wordpress:latest
Your site is now live at https://crm.instantly.run
(or your custom domain).