If I have an image that has an entrypoint like java -jar my.jar Is there a clean way to run that image in away that prefaces the entrypoint, so that it becomes my-other-command java -jar my.jar
Specifically I have an image that is a lambda function that I sometimes want to deploy to the cloud, but locally I want to use https://github.com/aws/aws-lambda-runtime-interface-emulator which requires starting that service with my entry point as the args to that command.
I know I can just have a bash if statement and check for an enviromental variable in the dockerfile, but I would prefer to leave the dockerfile just starting the jar, is there a way to "wrap" the normal entrypoint with docker run?
it sounds like you probably want to derive your own docker image
and if you're running a jar, you can probably just put a java image in your FROM line. you may not need any clojure stuff at runtime there.
Are you saying I can use my own, jar-starting image as the FROM in another image that instead starts that emulator as the entrypoint? Or that I should just create my own image that does one or the other based on an env var?
I meant the latter, but either one could work
gotcha, thanks!