Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Force Unix style line endings for files that will be copied into the Docker image
*.sh text eol=lf

# Auto detect text files and perform LF normalization on the rest
* text=auto
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
FROM alpine:3.20.3

CMD [ "/usr/bin/svnserve", "--daemon", "--foreground", "--root", "/var/opt/svn" ]
EXPOSE 3690

HEALTHCHECK CMD netstat -ln | grep 3690 || exit 1

VOLUME [ "/var/opt/svn" ]
WORKDIR /var/opt/svn

ENV SVNSERVE_ARGS=

RUN apk add --no-cache \
subversion==1.14.3-r2 \
wget==1.24.5-r0

COPY docker-entrypoint.sh /
CMD [ "/docker-entrypoint.sh" ]
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,33 @@ services:
- /home/svn:/var/opt/svn
```

### Start the Subversion server with custom arguments

To define arguments to be passed to the Subversion server, set the `SVNSERVE_ARGS` environmental variable:

#### ...via `docker run`

```sh
docker run ... SVNSERVE_ARGS="--option1 value1 --option2 value2" ... garethflowers/svn-server
```

#### ...via `docker compose`

```sh
services:
svn:
image: garethflowers/svn-server
environment:
- SVNSERVE_ARGS=--option1 value1 --option2 value2
...
```

### List available command line options

```sh
docker exec -it CONTAINER_NAME svnserve --help
```

### Creating a new SVN Repository

Use `svnadmin` within your container to create and manage repositories.
Expand Down
5 changes: 5 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

set -e

/usr/bin/svnserve --daemon --foreground --root /var/opt/svn $SVNSERVE_ARGS