[Question] sm-docker zips and uploads the current dir, not the target dir?
From my investigations into #2, I saw that sm-docker is zipping and uploading the current folder, not the target folder, when a target is given. E.g:
sm-docker build ./docker
# Uploads all of ./ (not just ./docker) to S3
Is this expected and deliberate for some reason? If you have lots of other stuff in your folder it can make for a significantly slower wait than the (also working) cd ./docker && sm-docker build .
also if the current dir does not have a dockerfile, it will still spin off the codebuild job and fail during the build stage. Suggest checking for a dockerfile first before starting the process
Is this expected and deliberate for some reason?
Hi @athewsey, yes this is expected. See https://github.com/aws-samples/sagemaker-studio-image-build-cli/blob/fb616c091b6c2fdca0c85a970218ff4bd0426440/sagemaker_studio_image_build/builder.py#L34-L40 and this is also explained in the README https://github.com/aws-samples/sagemaker-studio-image-build-cli/blame/master/README.md#L31.
However, your point is valid, as the docker CLI honors the target directory and not the current directory. For e.g., docker build examples/basic_build works without having to "cd" into the directory.
@w601sxs - Good call, that's a great enhancement.