lib/command/build_image.rb in cpl-1.2.0 vs lib/command/build_image.rb in cpl-1.3.0

- old
+ new

@@ -5,16 +5,18 @@ NAME = "build-image" OPTIONS = [ app_option(required: true), commit_option ].freeze + ACCEPTS_EXTRA_OPTIONS = true DESCRIPTION = "Builds and pushes the image to Control Plane" LONG_DESCRIPTION = <<~DESC - Builds and pushes the image to Control Plane - Automatically assigns image numbers, e.g., `app:1`, `app:2`, etc. - Uses `.controlplane/Dockerfile` or a different Dockerfile specified through `dockerfile` in the `.controlplane/controlplane.yml` file - If a commit is provided through `--commit` or `-c`, it will be set as the runtime env var `GIT_COMMIT` + - Accepts extra options that are passed to `docker build` DESC def call # rubocop:disable Metrics/MethodLength ensure_docker_running! @@ -30,10 +32,12 @@ commit = config.options[:commit] build_args = [] build_args.push("GIT_COMMIT=#{commit}") if commit - cp.image_build(image_url, dockerfile: dockerfile, build_args: build_args) + cp.image_build(image_url, dockerfile: dockerfile, + docker_args: config.args, + build_args: build_args) progress.puts("\nPushed image to '/org/#{config.org}/image/#{image_name}'.") end private