Cloning a repo on Docker Start


I am running the latest Gog from docker Gogs Version: and SQLLite

I following the instructions on the Docker image. I understand how the volume works and all.

My issue is what is the best way to execute some commands from the Gog Docker image.

My case is this. I want Gog to start and then Clone or Mirror a Repo on start. This means I need an organization and probably some SSH keys. I don’t want to use the Web UI but have this all scripted. I assume in the Docker file but looking for the best way IF anyone has suggestions


I think you might need to build your custom Docker image, which execute a script, do the clone/mirror work then start Gogs web server.