rancher / dapper

Docker build wrapper
Apache License 2.0
365 stars 88 forks source link

Feature Request: Option to call docker build with Dapper-Dockerfile contents via stdin instead of using `-f` #53

Closed rmoriz closed 5 years ago

rmoriz commented 6 years ago

Dapper currently calls docker build -f <filename> which has a big downside in large monorepo roots (think of multiple GB in size), because this will send everything as build context to the dockerd each time.

Docker itself only allows one "global" .dockeringore file, this would apply for all Dockerfiles including all dapper-related Dockerfiles. Excluding everything there is not an option: In our case we have existing Dockerfiles that require everything as build-context, and we have several Dockerfile.dapper.xxx which should have an empty build context (data is bind-mounted later).

I suggest to add a flag to dapper so that docker can be called somehow like this:

docker build --tag $TAG - <<EOF
$(cat $DOCKERFILE)
EOF