1# Running Soft-Serve with Docker
2
3The official Soft Serve Docker images are available at [charmcli/soft-serve][docker]. Development and nightly builds are available at [ghcr.io/charmbracelet/soft-serve][ghcr]
4
5```sh
6docker pull charmcli/soft-serve:latest
7```
8
9Here’s how you might run `soft-serve` as a container. Keep in mind that
10repositories are stored in the `/soft-serve` directory, so you’ll likely want
11to mount that directory as a volume in order keep your repositories backed up.
12
13```sh
14docker run \
15 --name=soft-serve \
16 --volume /path/to/data:/soft-serve \
17 --publish 23231:23231 \
18 --publish 23232:23232 \
19 --publish 23233:23233 \
20 --publish 9418:9418 \
21 --restart unless-stopped \
22 charmcli/soft-serve:latest
23```
24
25Or by using docker-compose:
26
27```yaml
28---
29version: "3.1"
30services:
31 soft-serve:
32 image: charmcli/soft-serve:latest
33 container_name: soft-serve
34 volumes:
35 - /path/to/data:/soft-serve
36 ports:
37 - 23231:23231
38 - 23232:23232
39 - 23233:23233
40 - 9418:9418
41 restart: unless-stopped
42```
43
44[docker]: https://hub.docker.com/r/charmcli/soft-serve
45[ghcr]: https://github.com/charmbracelet/soft-serve/pkgs/container/soft-serve
46
47***
48
49Part of [Charm](https://charm.sh).
50
51<a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge-unrounded.jpg" width="400"></a>
52
53Charm热爱开源 • Charm loves open source