Trying to figure out a way to bootstrap packer in `dockerfile`
Hi! I am trying to containerizing my config just as yours, and your dockerfile gives me a lot of help! Thanks for sharing your dockerfile!
The last thing I am missing is: I want to bootstrap my packer and download nvim plugins within dockerfile,
however I find that running --headless will make nvim stuck and never quit, so the dockerfile cannot finish to build. So I can't bootstrap packer and download plugins in the dockerfile.
RUN nvim --headless
Bootstrapping in dockerfile is important because that in some servers with strict network limitation where github isn't viable, I don't want to start an image that isn't completely set to work.
Hello, unfortunately I didn't got it to work anymore. The part I commented out in this commit used to work but pls have a look at #8 and the workaround described by @partounian. Maybe this helps you.
I figure out the reason, don't set the option max_jobs for packer.init when it is in headless mode. And everything runs smoothly.
This is great news! Unfortunately, running :PackerSync (not in Docker context) gets stuck without this setting. Can you confirm this?
yes, it has the issue. But is is not related to in docker or not, it is about in headless mode or in TUI mode. In TUI mode, max_jobs are needed to be set, and in headless mode, max_jobs should be nil.
Thanks for your clarification. I made a small workaround that should fix this issue - pls give it a try