From 7a8e673e6802ef06f0b30de07d7748471c1ec14d Mon Sep 17 00:00:00 2001 From: Gareth Flowers Date: Fri, 7 Jun 2024 00:33:54 +0100 Subject: [PATCH] docs(readme): adds docker compose example --- README.md | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c183d43..d1c3eb5 100644 --- a/README.md +++ b/README.md @@ -6,26 +6,46 @@ A simple Subversion server, using `svnserve`. ### Start a Subversion Server instance -To start a container, with data stored in `/home/svn` on the host, use the following: +To start a container, with data stored in `/home/svn` on the host, use the +following: + +#### ...via `docker run` + ```sh docker run \ - --name my-svn-server \ - --detach \ - --volume /home/svn:/var/opt/svn \ - --publish 3690:3690 \ - garethflowers/svn-server + --name my-svn-server \ + --detach \ + --volume /home/svn:/var/opt/svn \ + --publish 3690:3690 \ + garethflowers/svn-server +``` + +#### ...via `docker compose` + +```sh +services: + svn: + image: garethflowers/svn-server + ports: + - 3690:3690/tcp + volumes: + - /home/svn:/var/opt/svn ``` ### Creating a new SVN Repository Use `svnadmin` within your container to create and manage repositories. -For example, to create a repository called `new-repo` in container `my-svn-server`, use the following: +For example, to create a repository called `new-repo` in container +`my-svn-server`, use the following: + ```sh docker exec -it my-svn-server svnadmin create new-repo ``` ## License -* Apache Subversion is released under the [Apache License](https://www.apache.org/licenses/LICENSE-2.0). -* This image is released under the [MIT License](https://raw.githubusercontent.com/garethflowers/docker-svn-server/master/LICENSE). +- Apache Subversion is released under the + [Apache License](https://www.apache.org/licenses/LICENSE-2.0). +- This image is released under the + [MIT License](https://raw.githubusercontent.com/garethflowers/docker-svn-server/master/LICENSE).