rancher / dapper

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

`dapper --build -- -t xxx` can not work on v0.4.0 #67

Closed niusmallnan closed 5 years ago

niusmallnan commented 5 years ago

Just take RancherOS as an example: https://github.com/rancher/os/blob/master/scripts/build-images#L22

It can work on v0.3.4, but not v0.4.0.

Try v0.4.0:

$ dapper -d --build -f images/00-rootfs/Dockerfile -- -t rancher/os-rootfs images/00-rootfs
DEBU[0000] Building os:master using images/00-rootfs/Dockerfile
DEBU[0000] Created tempfile images/00-rootfs/Dockerfile109593587
DEBU[0000] Running /usr/bin/docker [build -t os:master -f images/00-rootfs/Dockerfile109593587 .]
Sending build context to Docker daemon 35.55 MB
Step 1/2 : FROM scratch
 --->
Step 2/2 : ADD build/rootfs.tar /
ADD failed: stat /var/lib/docker/tmp/docker-builder070439420/build/rootfs.tar: no such file or directory
DEBU[0006] Failed running /usr/bin/docker [build -t os:master -f images/00-rootfs/Dockerfile109593587 .]: exit status 1

Try 0.3.4:

$ dapper -d --build -f images/00-rootfs/Dockerfile -- -t rancher/os-rootfs images/00-rootfs
DEBU[0000] Running /usr/bin/docker [build -f images/00-rootfs/Dockerfile -t rancher/os-rootfs images/00-rootfs]
Sending build context to Docker daemon 47.37 MB
Step 1/2 : FROM scratch
 --->
Step 2/2 : ADD build/rootfs.tar /
 ---> Using cache
 ---> a70d5a7eb118
Successfully built a70d5a7eb118
Successfully tagged rancher/os-rootfs:latest

It was introduced by https://github.com/rancher/dapper/commit/ca29bae771ac0043493235872cee8da7adcb2147