circle CIを使ってDockerイメージをECRへpushする際、buildの時点でcircle CI上で以下のようなエラーが発生しています。
"docker build" requires exactly 1 argument.
docker buildの際に設定している引数がおかしいということはわかるのですが、引数のどこが間違っているのかがわからず、どなたかアドバイスをいただけると幸いです。
エラー詳細
build image
$ #!/bin/sh -eo pipefail $(aws ecr get-login --no-include-email --region ap-northeast-1) docker build -t ${ECR_DOMAIN}/sample-image:$CIRCLE_SHA1 -t ${ECR_DOMAIN}/sample-image:latest --build-arg RAILS_MASTER_KEY =${RAILS_MASTER_KEY} --build-arg RAILS_ENV=production . WARNING! Using --password via the CLI is insecure. Use --password-stdin. WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store Login Succeeded "docker build" requires exactly 1 argument. See 'docker build --help'. Usage: docker build [OPTIONS] PATH | URL | - Build an image from a Dockerfile Exited with code exit status 1
関係ファイル
<.circleci/config.yml>
〜省略 build_image: docker: - image: docker:18.09.0 steps: - checkout - setup_remote_docker - run: name: install aws cli command: | apk add --no-cache --update py-pip pip install awscli - run: name: build image command: | $(aws ecr get-login --no-include-email --region ap-northeast-1) docker build -t ${ECR_DOMAIN}/sample-image:$CIRCLE_SHA1 -t ${ECR_DOMAIN}/sample-image:latest --build-arg RAILS_MASTER_KEY =${RAILS_MASTER_KEY} --build-arg RAILS_ENV=production . - run: name: Push docker image command: | docker push ${ECR_DOMAIN}/sample-image:$CIRCLE_SHA1 docker push ${ECR_DOMAIN}/sample-image:latest 〜省略
【補足】
ECR_DOMAINおよびRAILS_MASTER_KEYはcircle CI上で設定している環境変数です。こちらについては、正しい内容が設定されていることを確認済みです。
環境
Mac OS
rails 2.5.3
docker

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/01/13 08:57