Some of the features offered by Docker are: Over three million people use GitHub to build amazing things together.ĭocker belongs to "Virtual Machine Platforms & Containers" category of the tech stack, while GitHub can be primarily classified under "Code Collaboration & Version Control". GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. The Docker Platform is the industry-leading container platform for continuous, high-velocity innovation, enabling organizations to seamlessly build and share any application - from legacy to what comes next - and securely run them anywhere GitHub: Powerful collaboration, review, and code management for open source and private development projects. I am cloning from the root context, ie I am still working to figure out why the browser is not indexing the repo's for display, but at least the core need (cloning over http) is working.Docker vs GitHub: What are the differences?ĭocker: Enterprise Container Platform for High-Velocity Innovation. However, if I attempt to clone, git finds the repos and clones just fine. Now when I navigate locally to the container's IP address, the browser gives me a 404, that there is nothing to serve. I DO NOT KNOW HOW SECURE THESE CONFIGURATIONS ARE (Obviously, this is all pretty standard stuff from other postings about how to set up an Apache Git server)Ģd) Comment in LoadModule cgi_module modules/mod_cgi.so ScriptAlias / /usr/libexec/git-core/git-http-backend/ SetEnv GIT_PROJECT_ROOT /usr/local/apache2/htdocs, Options +Indexes +FollowSymLinks +ExecCGI (not sure if the FollowSymLinks option in necessary)Ģc) add the following settings to the config: This is what finally worked:ġ) put all the git repos in the default deploy folder ( /usr/local/apache2/htdocs) using the docker -v flag from my original question post.Ģ) Modify the default nf for the alpine image and add the following: (actually I get a 403 no matter if I change the permissions or not) , but now when I clone:įatal: unable to access '': The requested URL returned error: 403 Running top I see that the process is owned by daemon, I have cd'ed to /usr/local/apache2/git from inside the container and run chown -R daemon:daemon. I have spent two days trying to get this to work, so any guidance at this point is welcome. With the Dockerfile and apacheGitServer.xml in the same folder, I have been building the image withĪnd then I have cd'ed to the directory with my git repo's, and issued the commandĭocker run -d -name apachegitserver -p 80:80 -v $(pwd):/usr/local/apache2/git apachegit This configuration makes the repos accessible, but not clone-able (except, of course DynamicDockerTesting.git) #ScriptAlias / /usr/share/gitweb/gitweb.cgiĪpacheGitServer.xml has gone through a number of revisions as I have tried every configuration that I could think of to get this working, but to no avail. ScriptAlias /git/ /usr/libexec/git-core/git-http-backend SetEnv GIT_PROJECT_ROOT /usr/local/apache2/git Here are the contents of apacheGitServer.xml RUN sed -i '/LoadModule alias_module modules/mod_alias.so/aLoadModule cgi_module modules/mod_cgi.so' /usr/local/apache2/conf/nfĪlpine Apache seems to run everything out of /usr/local/apache2 (instead of /etc/apache2), so here I am just adding to the default nf the logic to deploy the repos, and also enabling the cgi module since it is disabled by default ( env and alias are enabled by default). RUN cat /usr/local/apache2/apacheGitServer.xml > /usr/local/apache2/conf/nf RUN apk update & apk upgrade & apk add git git-gitweb apache2-utils apache2ĬOPY apacheGitServer.xml /usr/local/apache2/ Here are the contents of my Dockerfile FROM httpd:alpine If you have suggestions as to how to figure out why this is the case I would love to hear them, but more importantly if you know what I am doing wrong in general, and how to deploy these repo's successfully using the docker-alpine-apache-git combination, I would be extremely grateful. I have inspected every difference I can think of between DynamicDockerTesting.git and the other repo's present, but have not been able to find any meaningful difference that would explain why I can clone that particular repo, but none of the other ones. When attempting to clone the other repo's I get fatal: repository '' not found However when I attempt to clone the git repo's, I can only successfully clone the DynamicDockerTesting.git repo. I am able to get Apache to serve up documents and folders over http (there are some non git repos in this folder, this is just a proof of concept at the moment, so they can be ignored): I am trying to serve git repos over http using Alpine's Apache image in Docker.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |