Skip to content

Commit f92dc3f

Browse files
authored
docs: branch selection (#154)
1 parent 41f138b commit f92dc3f

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Build development environments from a Dockerfile on Docker, Kubernetes, and Open
2424

2525
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.
2626

27-
> `/tmp/envbuilder` is used to persist data between commands for the purpose of this demo. You can change it to any directory you want.
27+
> `/tmp/envbuilder` directory persists demo data between commands. You can choose a different directory.
2828
2929
```bash
3030
docker run -it --rm \
@@ -47,6 +47,14 @@ $ vim .devcontainer/Dockerfile
4747

4848
Exit the container, and re-run the `docker run` command... after the build completes, `htop` should exist in the container! 🥳
4949

50+
### Git Branch Selection
51+
52+
Choose a branch using `GIT_URL` with a _ref/heads_ reference. For instance:
53+
54+
```
55+
GIT_URL=https://github.com/coder/envbuilder-starter-devcontainer/#refs/heads/my-feature-branch
56+
```
57+
5058
## Container Registry Authentication
5159

5260
envbuilder uses Kaniko to build containers. You should [follow their instructions](https://github.com/GoogleContainerTools/kaniko#pushing-to-different-registries) to create an authentication configuration.
@@ -85,7 +93,7 @@ resource "kubernetes_deployment" "example" {
8593
}
8694
spec {
8795
spec {
88-
container {
96+
container {
8997
# Define the volumeMount with the pull credentials
9098
volume_mount {
9199
name = "docker-config-volume"
@@ -194,8 +202,7 @@ A sample script to pre-fetch a number of images can be viewed [here](./examples/
194202

195203
The `SETUP_SCRIPT` environment variable dynamically configures the user and init command (PID 1) after the container build process.
196204

197-
> **Note**
198-
> `TARGET_USER` is passed to the setup script to specify who will execute `INIT_COMMAND` (e.g., `code`).
205+
> **Note** > `TARGET_USER` is passed to the setup script to specify who will execute `INIT_COMMAND` (e.g., `code`).
199206
200207
Write the following to `$ENVBUILDER_ENV` to shape the container's init process:
201208

@@ -225,7 +232,6 @@ docker run -it --rm \
225232
- [`SSL_CERT_DIR`](https://go.dev/src/crypto/x509/root_unix.go#L25): Identifies which directory to check for SSL certificate files.
226233
- `SSL_CERT_BASE64`: Specifies a base64-encoded SSL certificate that will be added to the global certificate pool on start.
227234

228-
229235
# Local Development
230236

231237
Building `envbuilder` currently **requires** a Linux system.
@@ -243,4 +249,4 @@ On MacOS or Windows systems, we recommend either using a VM or the provided `.de
243249
- `build`: builds and tags `envbuilder:latest` for your current architecture.
244250
- `develop`: runs `envbuilder:latest` against a sample Git repository.
245251
- `test`: run tests.
246-
- `test-registry`: stands up a local registry for caching images used in tests.
252+
- `test-registry`: stands up a local registry for caching images used in tests.

0 commit comments

Comments
 (0)