0715.html 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Run Apache Subversion Containerized in Docker</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <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">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Run Apache Subversion Containerized in Docker">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="03/10/2024 08:20:54 AM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Run Apache Subversion Containerized in Docker</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is Subversion?</h2>
  26. <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>
  27. <h2>Installing Docker</h2>
  28. <ol>
  29. <li>Log into the Linux based device</li>
  30. <li>Run the following commands in the terminal
  31. <div class="codeBlock"># install prerequisites<br />
  32. sudo apt install apt-transport-https ca-certificates git curl software-properties-common gnupg-agent -y<br />
  33. # add docker gpg key<br />
  34. curl -fsSL https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release)/gpg | sudo apt-key add -<br />
  35. # add docker software repository<br />
  36. sudo add-apt-repository &quot;deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release) $(lsb_release -cs) stable&quot;<br />
  37. # install docker<br />
  38. sudo apt install docker-ce docker-compose containerd.io -y<br />
  39. # enable and start docker service<br />
  40. sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
  41. # add the current user to the docker group<br />
  42. sudo usermod -aG docker $USER<br />
  43. # reauthenticate for the new group membership to take effect<br />
  44. su - $USER</div>
  45. </li>
  46. </ol>
  47. <h2>Running Subversion</h2>
  48. <ol>
  49. <li>Now that Docker is installed, run the following commands to setup the Subversion Docker container and run it
  50. <div class="codeBlock"># create repository directory<br />
  51. mkdir ~/docker/subversion/repos -p<br />
  52. # run subversion container<br />
  53. 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>
  54. </li>
  55. <li>Open a web browser and navigate to http://DNSorIP:8080</li>
  56. <li>Login with the credentials set with the SVN_LOCAL_ADMIN_USER and SVN_LOCAL_ADMIN_PASS environment variables</li>
  57. <li>Open a new browser tab and navigate to http://DNSorIP:8080/websvn</li>
  58. <li>Welcome to Subversion running in Docker</li>
  59. </ol>
  60. <h2>Create a New Repository</h2>
  61. <ol>
  62. <li>With Subversion running, continue with the following commands to create a new code repository
  63. <div class="codeBlock"># create a repository called demorepo<br />
  64. docker exec -it subversion /usr/bin/svnadmin create /data/svn/sandbox/demorepo</div>
  65. </li>
  66. <li>Back in the browser refresh WebSVN to see the new repository</li>
  67. </ol>
  68. <p>Source: <a href="https://github.com/iaean/docker-subversion" target="_blank">https://github.com/iaean/docker-subversion</a></p> </div>
  69. </div>
  70. </body>
  71. </html>