This Docker command runs an svnserve
container with automatic restart, mapping the host directory /Users/briancullinan/Documents/svn
to the container directory, and exposing port 3690 for version control operations. The command uses the gcscaglia/docker-svnserve
image with the latest available version.
docker run \
--name svnserve \
--restart always \
-p 3690:3690 \
--volume /Users/briancullinan/Documents/svn:/var/opt/svn:rw \
gcscaglia/docker-svnserve:latest
#!/bin/bash
# Constants
SVN_HOSTNAME="svnserve"
SVN_CONTAINER_NAME="${SVN_HOSTNAME}"
SVN_PORT=3690
# Define environment variables
export SVN_HOSTNAME
export SVN_CONTAINER_NAME
export SVN_PORT
# Create container with restart policy
docker run \
--name "${SVN_CONTAINER_NAME}" \
--restart always \
-p "${SVN_PORT}:${SVN_PORT}" \
--volume "/Users/briancullinan/Documents/svn:/var/opt/svn:rw" \
--log-driver json-file \
--log-opt max-size=10m \
gcscaglia/docker-svnserve:latest
The provided command runs a Docker container for svnserve
version control server.
--name svnserve
: Names the container as svnserve
.--restart always
: Configures the container to restart automatically if it exits.-p 3690:3690
: Maps port 3690 on the host machine to port 3690 inside the container.--volume /Users/briancullinan/Documents/svn:/var/opt/svn:rw
: Maps a host directory to a container directory with read-write permissions.gcscaglia/docker-svnserve:latest
: Specifies the Docker image to use, gcscaglia/docker-svnserve
with the latest available version.This command is used to start a container for hosting an SVN server, allowing version control operations on the specified host directory.