Hi everyone! I'm using shiplift in a small side project in which I build docker images and run them as self contained development environments. Today I realized one of my dockerfiles had an ARG statement and I have no way to set it through shiplift. Has someone looked into adding support for the buildargs parameter of the docker API? I have not been able to find an issue related to this. https://docs.docker.com/engine/api/v1.41/#tag/Image/operation/ImageBuild
From what I can tell we would need to add a build_arg method to BuildOptionsBuilder that takes the key and values. The problem I see is build_arg could be called multiple times and BuildOptionsBuilder has a params hash map that can only accept strings, so we would need to:
- Have a single
buildargs key and for every call to build_arg do some string manipulation to add the new argument.
- Have a separate
buildargs hash map in BuildOptionsBuilder, add key/value pairs directly in there and serialize it separately from the rest of the arguments.
Would love to hear some feedback on this, maybe even put together a PR if it sounds good to the community 😄
Hi everyone! I'm using shiplift in a small side project in which I build docker images and run them as self contained development environments. Today I realized one of my dockerfiles had an
ARGstatement and I have no way to set it through shiplift. Has someone looked into adding support for thebuildargsparameter of the docker API? I have not been able to find an issue related to this. https://docs.docker.com/engine/api/v1.41/#tag/Image/operation/ImageBuildFrom what I can tell we would need to add a
build_argmethod toBuildOptionsBuilderthat takes the key and values. The problem I see isbuild_argcould be called multiple times andBuildOptionsBuilderhas aparamshash map that can only accept strings, so we would need to:buildargskey and for every call tobuild_argdo some string manipulation to add the new argument.buildargshash map inBuildOptionsBuilder, add key/value pairs directly in there and serialize it separately from the rest of the arguments.Would love to hear some feedback on this, maybe even put together a PR if it sounds good to the community 😄