Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker image creation #429

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Aloz1
Copy link

@Aloz1 Aloz1 commented Jun 16, 2021

It would be advantageous for several reasons (security, dev-ops deploy-ability, environment segregation), to have git-as-svn running inside docker.

I've been playing around with docker and gradle to generate a docker image. I've got it to the point where I think it would be useful for others, although I'd still consider it a WIP for now.

@Aloz1
Copy link
Author

Aloz1 commented Jun 16, 2021

Also, I'm not super familiar with gradle (I don't usually dabble in java or kotlin that much), so I'm not convinced the targets are as nice as they could be. Using 'Exec::class' to invoke 'sh' just to allow docker to pipe to bzip2 feels hacky, but it seems to work well. Surely there's a more idiomatic way of doing that in gradle???

@Aloz1
Copy link
Author

Aloz1 commented Jun 16, 2021

Also, at the moment, it just uses 'config.yml' as a default when it sets up its environment. I'm thinking it might be nice if there was a "GAS_CONFIG_TEMPLATE" env variable that the container could use to choose the config file to spit out if there isn't one already there. It won't make a difference 99% of the time, but would make setup marginally more convenient if someone's setting up git-as-svn for the first time.

@slonopotamus
Copy link
Collaborator

I'm not sure I am ready to support this. Such dockerfile almost fully duplicates the logic from git-as-svn debian packaging.

@Aloz1
Copy link
Author

Aloz1 commented Jan 27, 2022

Hm. There's certainly somewhat of a "duplicated" effort here from the fact that the docker image is based on Alpine instead of Debian. I might play around with reworking this to be a Debian based image instead, meaning it can make use of the already generated .deb file.

I might also see what I can do about the duplicated "config.yml". I wasn't totally happy with that myself.

@slonopotamus
Copy link
Collaborator

Also: it is very likely that whoever uses it would want to make modifications to config file.

Additional thoughts: most of git-as-svn users that I am aware of, use git-as-svn combined with GitLab. Unfortunately, they bneed to be in the same process space because git-as-svn invokes GitLab pre-push hooks. This docker image cannot be used for that.

@slonopotamus
Copy link
Collaborator

it can make use of the already generated .deb file

Yep, this might end up as a more manageable construction.

@Aloz1
Copy link
Author

Aloz1 commented Jan 28, 2022

Also: it is very likely that whoever uses it would want to make modifications to config file.

Yep, that should be possible as is. I guess I should also put together some documentation on how one would setup git-as-svn in docker.

Additional thoughts: most of git-as-svn users that I am aware of, use git-as-svn combined with GitLab. Unfortunately, they bneed to be in the same process space because git-as-svn invokes GitLab pre-push hooks. This docker image cannot be used for that.

Ah, good to know. I'll work out how this is gonna integrate with the dockerised gitlab. I must admit, I've only tested this against gitea for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants