I am following "Creating a Docker container action" and everything works great for me except that I would like to parametrize FROM
field in my Dockerfile
(I need to run CI tests against different versions of dependency, packaged as Docker image).
Ideally, in my Dockerfile
, I'd like to use ARG
or something something similar to:
ARG version=latest
FROM alpine:${version}
...
... but it is unclear how to pass build args.
Is there a way to something like this?
CodePudding user response:
I have not found a good way to do this out of the box.
At the moment Docker container action
won't even let you to specify Dockerfile using arguments (through runs.image
in action.yml
).
The solution for me was using this action.