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

Dockerfile: add a dockerfile that install docurium with its dependencies #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlosmn
Copy link
Member

You can supposedly make this repo into an action like this so let's see how that goes.

Right now you run things like

docker build . -t docurium
docker run -v $SRC:/workspace -it docurium
# cd /workspace && cm doc api.docurium

It currently fails to create the actual commit because it really wants you to have configured your identity in git but this should work as a first step to play around with it.

@carlosmn
Copy link
Member Author

I've updated the Dockerfile to try to avoid it blowing up in size by using a multistage build and copying over the relevant files into a leaner image.

This still blows up if you don't take extra care to mount your git configuration. I'm not sure what the right thing to do here is to make it easier to user the container. We could mount the different places your user-level configuration might be, or maybe we should accept an environment variable that docurium should use if they exist?

@tiennou
Copy link
Contributor

tiennou commented Jun 17, 2019

Can you clarify what are you planning to use that Docker build for ? I thought it was about having a demo sandbox, then I wanted some developer one, and now that Dockerfile looks like it should "just work™", but with Linux-specific paths…

@carlosmn
Copy link
Member Author

I don't know what you mean with Linux-specific paths. This Dockerfile builds a Debian image so any paths are what works there.

My idea for this image is that you can use it to generate documentation either locally or as a CI step or an Action or whatever, without having to figure out what the dependencies are for it or which version of llvm happens to work now.

@tiennou
Copy link
Contributor

tiennou commented Jun 17, 2019

I missed that builder is an alias for the debian-stretch image, thus got confused by /var/lib. Sorry about that.

I'll have to investigate Actions then, that sounds crazy good. Thus I'm fine to :shipit: if you are, because I've used it already to check how non-macOS reacts.

@carlosmn
Copy link
Member Author

I still need to figure out what to do about the signature for the commit it crates, but otherwise I'm pretty happy with it. The multi-stage build can be a bit confusing (it's taken me two days to get to this comparatively simple set of rules) but it does mean that we have a ~475MB image instead of the ~1.5GB monstrosity that comes out if you leave everything installed.

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.

2 participants