Oh! I got Forgejo Actions working. Exciting!
Now I need to figure out how to automate some of my local workflows, and possibly bringing up an internal container registry.
Oh! I got Forgejo Actions working. Exciting!
Now I need to figure out how to automate some of my local workflows, and possibly bringing up an internal container registry.
@badnetmask nice! what was the thing about setting it up that you discovered along the way that you wish you knew when you started?
@w8emv
The docker-in-docker thing was non-trivial, but what is really biting me so far is finding the right image for the right workflows. Still can't find "the perfect one". 😄
@jgkawell @badnetmask I would love to see a detailed post about this. The documentation doesn’t seem to cover everything. I also had some trouble with the image and ended up rolling my own. I’m using forgejo actions to compile my static site and rsync it to the server.
@stevenix @jgkawell
Yeah, sure. I can write something after I use it a little bit more.
In the meantime, I'll leave you with a nice blog post from @jwildeboer (I did everything in Docker though, so very different).
https://jan.wildeboer.net/2024/08/Running-a-runner-codeberg/
@badnetmask Please post about your experience with them as you go! I host my own Forgejo but haven't tinkered with their actions yet. I wonder if they're in a good enough spot to ditch Github actions for.
Hmpf. Taking a beat from Forgejo Actions.
Forgejo and the runner are running from a compose. According to the docs, in this case I can use "docker-in-docker" to do the magic.
For whatever reason the runner (or the DinD runner) can't git clone from Forgejo. It doesn't matter if I use the internal Docker hostname (that translates to the internal IP), or the FQDN (that translates to the node's IP), I always get a "connection timeout".
Any ideas where to look/poke are welcome.
@mattesilver
Yes, they're all in the same Docker network. DinD exposes the host's docker.socket to be used by other containers.
@badnetmask so the runner in dind is trying to connect to forge in another container?
Sounds like networking.
Are they on the same docket network? Otherwise you'd probably need to expose that service.
Not that I know anything about dind 🙃
@mattesilver
Ok, you got a point. It's possible that the sub-container is coming up on a different subnet.
But like I said, it should be able to at least access via the host's own IP address, since the service is exposed.
@badnetmask AFAIK Docker.Socket is for the parent container to be able to start a child. It's separate from docker networking
Ha! Thanks to the little brainstorming with @mattesilver, I found out that all I needed to do to was to add "network: host" to the runner config! Yes, the DinD container was running on a *different* network. :picardfacepalm:
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.