mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
docs: consolidate docker quickstarts (#4882)
This commit is contained in:
@ -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">
|
||||
|
Reference in New Issue
Block a user