1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Run Apache Subversion Containerized in Docker</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta charset="UTF-8">
- <meta name="keywords" content="Browser Based,Docker Made Easy,Home Lab,Home Lab Ideas,Install Guide,Version Control,Ubuntu,Subversion,Source Control,Source Code,Source Code Tracking,SVN Server,SVN,Repository,Linux,Code Repository,Apache Subversion,Docker Simplified,Docker Made Simple,Homelab,Docker Container,Docker How To,Docker Tutorial,How To,Tutorial,i12bretro">
- <meta name="author" content="i12bretro">
- <meta name="description" content="Run Apache Subversion Containerized in Docker">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="revised" content="03/10/2024 08:20:54 AM" />
- <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
- <script type="text/javascript" src="includes/js/steps.js"></script>
- <link href="css/steps.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="gridContainer">
- <div class="topMargin"></div>
- <div id="listName" class="topMargin">
- <h1>Run Apache Subversion Containerized in Docker</h1>
- </div>
- <div></div>
- <div id="content">
- <h2>What is Subversion?</h2>
- <blockquote><em>Subversion exists to be universally recognized and adopted as an open-source, centralized version control system characterized by its reliability as a safe haven for valuable data; the simplicity of its model and usage; and its ability to support the needs of a wide variety of users and projects, from individuals to large-scale enterprise operations. -<a href="https://subversion.apache.org/" target="_blank">https://subversion.apache.org/</a></em></blockquote>
- <h2>Installing Docker</h2>
- <ol>
- <li>Log into the Linux based device</li>
- <li>Run the following commands in the terminal
- <div class="codeBlock"># install prerequisites<br />
- sudo apt install apt-transport-https ca-certificates git curl software-properties-common gnupg-agent -y<br />
- # add docker gpg key<br />
- curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -<br />
- # add docker software repository<br />
- sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"<br />
- # install docker<br />
- sudo apt install docker-ce docker-compose containerd.io -y<br />
- # enable and start docker service<br />
- sudo systemctl enable docker && sudo systemctl start docker<br />
- # add the current user to the docker group<br />
- sudo usermod -aG docker $USER<br />
- # reauthenticate for the new group membership to take effect<br />
- su - $USER</div>
- </li>
- </ol>
- <h2>Running Subversion</h2>
- <ol>
- <li>Now that Docker is installed, run the following commands to setup the Subversion Docker container and run it
- <div class="codeBlock"># create repository directory<br />
- mkdir ~/docker/subversion/repos -p<br />
- # run subversion container<br />
- docker run -d --name=subversion -p 8080:80 -p 3690:3690 -v ~/docker/subversion/repos:/data/svn -e SVN_LOCAL_ADMIN_USER=admin -e SVN_LOCAL_ADMIN_PASS=SomethingSecure --restart=unless-stopped iaean/subversion</div>
- </li>
- <li>Open a web browser and navigate to http://DNSorIP:8080</li>
- <li>Login with the credentials set with the SVN_LOCAL_ADMIN_USER and SVN_LOCAL_ADMIN_PASS environment variables</li>
- <li>Open a new browser tab and navigate to http://DNSorIP:8080/websvn</li>
- <li>Welcome to Subversion running in Docker</li>
- </ol>
- <h2>Create a New Repository</h2>
- <ol>
- <li>With Subversion running, continue with the following commands to create a new code repository
- <div class="codeBlock"># create a repository called demorepo<br />
- docker exec -it subversion /usr/bin/svnadmin create /data/svn/sandbox/demorepo</div>
- </li>
- <li>Back in the browser refresh WebSVN to see the new repository</li>
- </ol>
- <p>Source: <a href="https://github.com/iaean/docker-subversion" target="_blank">https://github.com/iaean/docker-subversion</a></p> </div>
- </div>
- </body>
- </html>
-
|