You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-39
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,15 @@ Build development environments from a Dockerfile on Docker, Kubernetes, and Open
22
22
23
23
## Quickstart
24
24
25
-
The easiest way to get started is to run the `envbuilder` Docker container that clones a repository, builds the image from a Dockerfile, and runs the `$INIT_SCRIPT` in the freshly built container.
25
+
The easiest way to get started is to run the `envbuilder` Docker container that clones a repository, builds the image from a Dockerfile, and runs the `$ENVBUILDER_INIT_SCRIPT` in the freshly built container.
26
26
27
27
> `/tmp/envbuilder` directory persists demo data between commands. You can choose a different directory.
If using envbuilder inside of [Coder](https://github.com/coder/coder), you can use the `coder_external_auth` Terraform resource to automatically provide this token on workspace creation:
161
161
@@ -166,27 +166,27 @@ data "coder_external_auth" "github" {
@@ -209,18 +209,18 @@ envbuilder will assume SSH authentication. You have the following options:
209
209
210
210
## Layer Caching
211
211
212
-
Cache layers in a container registry to speed up builds. To enable caching, [authenticate with your registry](#container-registry-authentication) and set the `CACHE_REPO` environment variable.
212
+
Cache layers in a container registry to speed up builds. To enable caching, [authenticate with your registry](#container-registry-authentication) and set the `ENVBUILDER_CACHE_REPO` environment variable.
213
213
214
214
```bash
215
215
CACHE_REPO=ghcr.io/coder/repo-cache
216
216
```
217
217
218
-
To experiment without setting up a registry, use `LAYER_CACHE_DIR`:
218
+
To experiment without setting up a registry, use `ENVBUILDER_LAYER_CACHE_DIR`:
219
219
220
220
```bash
221
221
docker run -it --rm \
222
222
-v /tmp/envbuilder-cache:/cache \
223
-
-e LAYER_CACHE_DIR=/cache
223
+
-e ENVBUILDER_LAYER_CACHE_DIR=/cache
224
224
...
225
225
```
226
226
@@ -243,7 +243,7 @@ docker run --rm \
243
243
# Run envbuilder with the local image cache.
244
244
docker run -it --rm \
245
245
-v /tmp/kaniko-cache:/image-cache:ro \
246
-
-e BASE_IMAGE_CACHE_DIR=/image-cache
246
+
-e ENVBUILDER_BASE_IMAGE_CACHE_DIR=/image-cache
247
247
```
248
248
249
249
In Kubernetes, you can pre-populate a persistent volume with the same warmer image, then mount it into many workspaces with the [`ReadOnlyMany` access mode](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes).
@@ -252,38 +252,38 @@ A sample script to pre-fetch a number of images can be viewed [here](./examples/
252
252
253
253
## Setup Script
254
254
255
-
The `SETUP_SCRIPT` environment variable dynamically configures the user and init command (PID 1) after the container build process.
255
+
The `ENVBUILDER_SETUP_SCRIPT` environment variable dynamically configures the user and init command (PID 1) after the container build process.
256
256
257
257
> [!NOTE]
258
-
> `TARGET_USER` is passed to the setup script to specify who will execute `INIT_COMMAND` (e.g., `code`).
258
+
> `TARGET_USER` is passed to the setup script to specify who will execute `ENVBUILDER_INIT_COMMAND` (e.g., `code`).
259
259
260
260
Write the following to `$ENVBUILDER_ENV` to shape the container's init process:
261
261
262
-
-`TARGET_USER`: Identifies the `INIT_COMMAND` executor (e.g.`root`).
263
-
-`INIT_COMMAND`: Defines the command executed by `TARGET_USER` (e.g. `/bin/bash`).
264
-
-`INIT_ARGS`: Arguments provided to `INIT_COMMAND` (e.g. `-c 'sleep infinity'`).
262
+
-`TARGET_USER`: Identifies the `ENVBUILDER_INIT_COMMAND` executor (e.g.`root`).
263
+
-`ENVBUILDER_INIT_COMMAND`: Defines the command executed by `TARGET_USER` (e.g. `/bin/bash`).
264
+
-`ENVBUILDER_INIT_ARGS`: Arguments provided to `ENVBUILDER_INIT_COMMAND` (e.g. `-c 'sleep infinity'`).
0 commit comments