1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Remove hacky "cp .../Dockerfile.build ." in "build-deb"

Turns out that `-f` on a file that's in `.dockerignore` actually does work.  No idea why it wasn't when I was doing this before, but oh well! 🤘

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
This commit is contained in:
Tianon Gravi 2015-05-01 14:45:00 -06:00
parent e1df16b3a3
commit 9f5730e131

View file

@ -56,15 +56,11 @@ DEST=$1
RUN { echo '$debSource (${debVersion}-0~${suite}) $suite; urgency=low'; echo; echo ' * Version: $VERSION'; echo; echo " -- $debMaintainer $debDate"; } > debian/changelog && cat >&2 debian/changelog
RUN dpkg-buildpackage -uc -us
EOF
cp -a "$DEST/$version/Dockerfile.build" . # can't use $DEST because it's in .dockerignore...
tempImage="docker-temp/build-deb:$version"
( set -x && docker build -t "$tempImage" -f Dockerfile.build . )
( set -x && docker build -t "$tempImage" -f "$DEST/$version/Dockerfile.build" . )
docker run --rm "$tempImage" bash -c 'cd .. && tar -c *_*' | tar -xvC "$DEST/$version"
docker rmi "$tempImage"
done
# clean up after ourselves
rm -f Dockerfile.build
source "${MAKEDIR}/.integration-daemon-stop"
) 2>&1 | tee -a "$DEST/test.log"