RMI-PACTA / docker

Docker images
https://2degreesinvesting.github.io/docker/
MIT License
1 stars 0 forks source link

Fail fast if not in pacta/ #2

Closed maurolepore closed 3 years ago

maurolepore commented 3 years ago

build fails with...

# Step 3/14 : COPY PACTA_analysis /bound
# COPY failed: stat /var/lib/docker/tmp/docker-builder369176070/PACTA_analysis: no such file or directory
cjyetman commented 3 years ago

this happens when running the script when the working directory is the root directory of this project, i.e. pacta/build_with_tag.sh 0.0.6

maurolepore commented 3 years ago

I'm tempted to completely remove the ability to call the command from outside pacta/. This feature is buggy and building an image from the directory containing a Dockerfile seems like common practice (and AFAIK it's enforced by docker-compose).

Would you be okay with that? -- hopefully to get less bugs and simpler code.

cjyetman commented 3 years ago

yeah, this is not a feature that I need

however, there's nothing explicitly preventing someone from running this from somewhere else, so maybe the script should check that its working directory is pacta or exit with a message?