Docker-py: how to pass context along with fileobj?

Created on 7 Oct 2020  路  1Comment  路  Source: docker/docker-py

My code files is located somewhere else and my docker build script is somewhere.

Getting error while running since Dockerfile is not able to find the context files

Most helpful comment

I've already raised this issue "couple of days ago" (https://github.com/docker/docker-py/issues/2105), but it seems that project got abandoned, because nobody form the maintainers care about it. There is also PR with this functionality https://github.com/docker/docker-py/pull/2456

Currently my way is to use the following pollyfil:

import docker.api.build
docker.api.build.process_dockerfile = lambda dockerfile, path: ('Dockerfile', dockerfile)

IMO will be good if someone who have time will adopt this project. No matter what Docker is still very popular nowadays, so it is externally sad that python library is dead and not maintained.

>All comments

I've already raised this issue "couple of days ago" (https://github.com/docker/docker-py/issues/2105), but it seems that project got abandoned, because nobody form the maintainers care about it. There is also PR with this functionality https://github.com/docker/docker-py/pull/2456

Currently my way is to use the following pollyfil:

import docker.api.build
docker.api.build.process_dockerfile = lambda dockerfile, path: ('Dockerfile', dockerfile)

IMO will be good if someone who have time will adopt this project. No matter what Docker is still very popular nowadays, so it is externally sad that python library is dead and not maintained.

Was this page helpful?
0 / 5 - 0 ratings