Skip to content

Commit 5d40ebc

Browse files
author
Katie Horne
authored
add Docker upgrade instructions (coder#933)
1 parent 88f4dc5 commit 5d40ebc

File tree

3 files changed

+56
-10
lines changed

3 files changed

+56
-10
lines changed

manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@
204204
},
205205
{
206206
"path": "./setup/coder-for-docker/postgres.md"
207+
},
208+
{
209+
"path": "./setup/coder-for-docker/upgrade.md"
207210
}
208211
]
209212
},

setup/coder-for-docker/local.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Coder for Docker works with the following platforms:
4343
only run this if you'd like a clean install.
4444

4545
1. In the terminal, run the following to download the resources you need,
46-
include the images, and set up your Coder deployment (if you're using the
46+
including the images, and set up your Coder deployment (if you're using the
4747
terminal in Docker Desktop, omit the slashes and run as a single-line
4848
command):
4949

@@ -72,9 +72,8 @@ Coder for Docker works with the following platforms:
7272
1. Launch a web browser and navigate to the URL provided by Coder (e.g.,
7373
`http://localhost:7080`). Log in using the credentials Coder provided.
7474

75-
1. At this point, you can [create a workspace](../workspaces/create.md) using
76-
one of the **Packaged** images by clicking on **New workspace** in the center
77-
of the UI.
75+
1. [Create a workspace](../workspaces/create.md) using one of the **Packaged**
76+
images by clicking on **New workspace** in the center of the UI.
7877

7978
At this point, you're ready to use your workspace. See our
8079
[getting started guide](../getting-started/docker.md) for detailed instructions
@@ -210,17 +209,17 @@ If you're interested in using Docker as a workspace provider, please see our
210209

211210
## Accessing the local PostgreSQL database
212211

213-
To query the local PostgreSQL database using the `psql` [terminal-based
214-
front-end](https://www.postgresql.org/docs/13/app-psql.html), follow these
215-
steps.
212+
To query the local PostgreSQL database using the `psql`
213+
[terminal-based front-end](https://www.postgresql.org/docs/13/app-psql.html),
214+
follow these steps.
216215

217216
1. Run `docker ps` to get the name of the Coder container.
218217

219218
1. Exec into the Coder container and connect to the database.
220219

221-
```console
222-
docker exec -it <CODER_CONTAINER> psql --username=coder --host=0.0.0.0 --port=5433 --dbname=postgres
223-
```
220+
```console
221+
docker exec -it <CODER_CONTAINER> psql --username=coder --host=0.0.0.0 --port=5433 --dbname=postgres
222+
```
224223

225224
## Known issues
226225

setup/coder-for-docker/upgrade.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: "Upgrade"
3+
description: Learn how to upgrade your Coder for Docker deployment.
4+
---
5+
6+
This guide will show you how to upgrade your Coder for Docker deployment.
7+
8+
To upgrade, run the following command to download the resources you need,
9+
including the latest images (ensure that you're providing the correct version
10+
number in the command, e.g., `1.29.0`):
11+
12+
```console
13+
docker run --rm -it \
14+
-p 7080:7080 \
15+
-v /var/run/docker.sock:/var/run/docker.sock \
16+
-v ~/.coder:/var/run/coder \
17+
codercom/coder:<version>
18+
```
19+
20+
## Docker Compose
21+
22+
If you use Docker Compose to run Coder, here's how to upgrade your deployment:
23+
24+
1. Update the Coder the version in your `docker-compose-yml` file:
25+
26+
```yml
27+
# ...
28+
services:
29+
coder:
30+
image: docker.io/codercom/coder:1.29.0
31+
# ...
32+
```
33+
34+
1. Recreate your image:
35+
36+
```console
37+
docker-compose up --force-recreate --build -d
38+
```
39+
40+
1. Start the container:
41+
42+
```console
43+
docker-compose up
44+
```

0 commit comments

Comments
 (0)