(TLDR): I have no clue how to setup Github to docker containerization via n8n.
Github > n8n > pull image > build image > push to local docker repo
I really want to start automating my process, I believe that my current setup of pushing to a github repo, building a local copy of my web app, pushing it to my repo and then deploying it is tedious and un-necessarily time consuming.
I have been playing around with n8n and I got a super basic workflow going, where it checks for a git push, so credentials and all are in place, however I am stuck on the actual commands section.
Where it pulls the image from github, builds it, pushes it, etc.
I couldn’t pull the repo using the github blocks, or at least not that I am aware of.
and so my conclusion was to use one of the command execution block things.
However I quickly ran into an issue with them; docker by default uses a gutted /bin/sh which doesn’t even come with a docker-cli, so it was completely useless to me.
I do need some assistance as I have been stuck with no way to move forward.
Realistically yes, but i’d like to keep it local.
I do not want to open a direct path to my registry, even if authentication for it is possible.
local is the goto for me.
(plus i’d be interesting to push n8n to it’s limits)
Well if there is a set of commands you’d normally run to perform all the tasks needed, you can use Execute Command node.. If you need commands, which aren’t present in the “getted” container, you can set a docker container alongside your n8n container to do things like building images.
Yeah, I’ve tried that route, although that never worked.
the SH terminal that docker has for n8n is so gutted, it doesn’t even have docker CLI, although I am unsure if this is just docker’s sh or genuinly container based.
in either case, I set n8n’s container to run on the host network.
I am playing around with the idea to create a new folder for n8n commands.
And just use SSH to connect back to my own system and just /bin/bash command.sh.
I’ll see if this works out or not.
the SSH part already is working.
I heard about it but I never looked into it too carefully, I tried to do something with recreating the image to include some tools, however that didn’t work for me, it kept whining about something.
The SSH route is the only route that seems to work for me right now.