docs: consolidate docker quickstarts (#4882)

This commit is contained in:
Ben Potter
2022-11-03 13:30:10 -05:00
committed by GitHub
parent 04ae4c036b
commit 75da08740c
3 changed files with 29 additions and 81 deletions

View File

@ -13,34 +13,41 @@ Coder with Docker has the following advantages:
## Instructions
1. [Install and launch Coder](../install)
1. Run Coder with Docker.
The Coder server binds to port 3000 by default. Use `--address :<port>` to customize it!
```shell
export CODER_DATA=$HOME/.config/coderv2-docker
export DOCKER_GROUP=$(getent group docker | cut -d: -f3)
mkdir -p $CODER_DATA
docker run --rm -it \
-v $CODER_DATA:/home/coder/.config \
-v /var/run/docker.sock:/var/run/docker.sock \
--group-add $DOCKER_GROUP \
ghcr.io/coder/coder:latest
```
> This will use Coder's tunnel and built-in database. See our [Docker documentation](../install/docker.md) for other configuration options such as running on localhost, using docker-compose, and external PostgreSQL.
Use the [Coder tunnel](../admin/configure.md#tunnel) for a public URL:
```bash
coder server
1. In new terminal, [install Coder](../install/) in order to connect to your deployment through the CLI.
```shell
curl -L https://coder.com/install.sh | sh
```
Or set an [access URL](../admin/configure.md#access-url) to run entirely locally:
```bash
coder server --access-url=http://localhost:3000 --address=:3000
```
1. Run `coder login <access url>` in a new terminal and follow the
1. Run `coder login <access url>` and follow the
interactive instructions to create your user.
1. Pull the "Docker" example template using the interactive `coder templates init`:
```bash
```shell
coder templates init
cd docker
```
1. Push up the template with `coder templates create`
1. Open the dashboard in your browser (http://localhost:3000) to create your
1. Open the dashboard in your browser to create your
first workspace:
<img src="../images/quickstart/docker/login.png">