Closed davorceman closed 1 year ago
I am having this same issue. Pretty sure I found the problem and agree that it would be an enhancement because the orb doesn't support this out of the box.
To solve your issue with the current orb version/capabilities, I suggest doing abandoning using path
and falling back to the docker args themselves:
In your workflow:
workflows:
build-push-and-deploy:
jobs:
- aws-ecr/build-and-push-image:
repo: app_1
tag: ${CIRCLE_SHA1}
extra-build-args: '-f aws_lambda/app_1/Dockerfile'
It's happening because the path
is used as the same value for both the location of the dockerfile and the location of the directory used to build from. See lines 76 and 81.
If there were another option, say dockerfile_path
that just pointed at the dockerfile path only, that would work I think.
EDIT:
This is more question, if someone can direct me how to solve this issue without changing project structure
I have to set circleci for one project with next structure... one repo for 3 different applications. Dockerfile for each app is in subfolder for that app. But in the root of the repo is poetry.lock and pyproject.toml They are already building from local without any issues, just with command as
docker build -t app_1-f aws_lambda/app_1/Dockerfile .
My dockerfile, let's say, for app_1 is:
My config.yml
I'm constantly getting errors like this
note: I needed to rename some directory names, so maybe there is some error in the code