This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-29
Channels
- # announcements (6)
- # babashka (23)
- # beginners (15)
- # biff (15)
- # calva (17)
- # clara (5)
- # clj-kondo (41)
- # cljdoc (2)
- # cljs-dev (67)
- # cljsrn (18)
- # clojure (19)
- # clojure-europe (25)
- # clojure-nl (2)
- # clojure-norway (9)
- # clojure-uk (2)
- # clojurescript (26)
- # core-typed (6)
- # cursive (15)
- # data-science (30)
- # datahike (1)
- # datomic (18)
- # docker (6)
- # emacs (10)
- # events (2)
- # graalvm (15)
- # graphql (5)
- # hugsql (4)
- # jobs-discuss (1)
- # joker (7)
- # lsp (36)
- # malli (28)
- # off-topic (46)
- # other-languages (1)
- # pathom (5)
- # pedestal (6)
- # polylith (5)
- # reitit (2)
- # releases (1)
- # rewrite-clj (63)
- # shadow-cljs (7)
- # spacemacs (16)
- # squint (6)
- # tools-deps (6)
- # xtdb (13)
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