develop.sh: attempt to create a Docker template automatically (#2627)

This commit makes the following changes:

- Adds two variables docker_host and docker_arch to the example docker-code-server template
- Adds an example params.yaml to docker-code-server and updates the README.md to reference these parameters
- scripts/develop.sh will now attempt to create a template using docker-code-server with the appropriate parameters for the environment
- Updated Lima example to make use of the template parameters for docker-code-server


Additional drive-bys:

- webpack.dev.ts references CODER_HOST and not CODERV2_HOST; updated develop.sh accordingly
- develop.sh should now terminate child processes upon error.
This commit is contained in:
Cian Johnston
2022-06-27 09:59:08 +01:00
committed by GitHub
parent f9d830a2b6
commit bbbd5241c3
6 changed files with 82 additions and 14 deletions
@@ -8,4 +8,18 @@ tags: [local, docker]
## Getting started
Run `coder templates init` and select this template. Follow the instructions that appear.
Run `coder templates init` and select this template. Follow the instructions that appear.
## Supported Parameters
You can create a file containing parameters and pass the argument
`--parameter-file` to `coder templates create`.
See `params.sample.yaml` for more information.
This template has the following predefined parameters:
- `docker_host`: Path to (or address of) the Docker socket.
> You can determine the correct value for this by runnning
> `docker context ls`.
- `docker_arch`: Architecture of the host running Docker.
This can be `amd64`, `arm64`, or `armv7`.