Running commands on entry of custom docker image

docker

#1

Hello!

Been following the guide to create a custom base image, I’d like to be able to pull in another git repo on build (ie. make sure it has the latest copy). This repo has centralised circleci specific scripts that we use across projects.

Thinking about this I can do it in 2 ways:

  • Custom entrypoint script which calls git clone
  • Use a git sub-module

I’m in favour of the former but not sure what CircleCI requires for an entrypoint to actually boot, would be good to understand that. Otherwise git sub-module it is (although that’ll download the scripts to the other environments :unamused:).

Thanks,
Alex

PS. Is there a repo with the Dockerfiles used for the “CircleCI Images”? I’m basing my image on the Node.js one and would be good to inspect that to make sure I’m not stepping on any toes!


#2

Coming soon!

This is probably ideal. That allows you to boot the container, pull in the keys from us, start the SSH daemon, and pull in the code.


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.