Open 130s opened 1 year ago
Looking at the lower api https://docker-py.readthedocs.io/en/stable/api.html#module-docker.api.build, there's no way to execute build
without passing Dockerfile
, which totally makes sense.
So...making docker_vcs
purely generic (so that it can build various software where build steps differ) is a higher bar than I thought.
It should still be possible to provide default Dockerfile
for the narrower context, e.g. ROS2. Aiming for that route. Usecase might have to be updated #12.
Environment
This issue arose while the work for https://github.com/kinu-garage/docker_vcs/pull/17 is done.
Issue
Dockerfile
mustn't be a required input, but once https://github.com/kinu-garage/docker_vcs/pull/17 merges,Log
``` $ docker_vcs --debug --docker_base_img $DOCKERIMG --workspace_on_host WORKSPACE_ON_HOST WARNING:root: Entrypoint executable not passed, nor any files with commonly used names are not found. This doesn't mean the tool should fail, e.g. if entrypoint is not used in Dockerfile, this won't cause any error. Limitation tracked: https://github.com/noodler/docker_vcs/issues/5 DEBUG:root:Paths: [None, ''] WARNING:root:Path 'None' was not copy-able. Continuing. Exception from lower mod: 'NoneType' was passed as a path. WARNING:root:Path '' was not copy-able. Continuing. Exception from lower mod: 'NoneType' was passed as a path. DEBUG:root:path_dockerfile: None, base_docker_img: moveit/moveit2:humble-release, path_repos_file: None INFO:root:Current dir before docker build: /home/nnoodler/git_repo/ROS/cws_utakata/noodler/docker_vcs, dockerfile: Dockerfile DEBUG:docker.utils.config:Trying paths: ['/home/nnoodler/.docker/config.json', '/home/nnoodler/.dockercfg'] DEBUG:docker.utils.config:Found file at path: /home/nnoodler/.docker/config.json DEBUG:docker.auth:Found 'auths' section DEBUG:docker.auth:Found entry (registry='https://index.docker.io/v1/', username='dnoodler') DEBUG:urllib3.connectionpool:http://localhost:None "GET /version HTTP/1.1" 200 818 ERROR:root:'docker build' failed: You must specify a directory to build in path DEBUG:root:Received obj in parse_build_result_dict: None Traceback (most recent call last): File "/home/nnoodler/git_repo/ROS/cws_utakata/noodler/docker_vcs/src/docker_vcs_lib/docker_builder_vcs.py", line 240, in docker_build raise e File "/home/nnoodler/git_repo/ROS/cws_utakata/noodler/docker_vcs/src/docker_vcs_lib/docker_builder_vcs.py", line 228, in docker_build _log = self._docker_build_low_api( File "/home/nnoodler/git_repo/ROS/cws_utakata/noodler/docker_vcs/src/docker_vcs_lib/docker_builder_vcs.py", line 182, in _docker_build_low_api responses = [line for line in docker_api.build( File "/usr/lib/python3/dist-packages/docker/api/build.py", line 148, in build raise TypeError("You must specify a directory to build in path") TypeError: You must specify a directory to build in path During handling of the above exception, another exception occurred: Traceback (most recent call last): ```