buildx.sh fails on git and docker commands
aetiologicCanada opened this issue · 2 comments
aetiologicCanada commented
Attempting to run this shell script on the Pi 4 (4GB) Buster but it dies parsing the shell script.
pi@raspberrypi:~/makeRstudio $ ./buildx.sh buster build-env
Start building at 2019-11-14T22:17:00Z ...
+ perl -pe 's/^(.*cross-build-.*)/# $1/' docker/Dockerfile.build-env
+ perl -pe 's#^(FROM arturklauser/\S+)#$1-buildx#'
++ git log --pretty=format:%H HEAD~..HEAD
fatal: not a git repository (or any of the parent directories): .git
Can't open docker/Dockerfile.build-env: No such file or directory.
++ timestamp
++ date -u +%Y-%m-%dT%H:%M:%SZ
+ docker buildx build --platform linux/arm/v7 --progress plain --push --build-arg DEBIAN_VERSION=buster --build-arg VERSION_TAG=1.2.5001 --build-arg VERSION_MAJOR=1 --build-arg VERSION_MINOR=2 --build-arg VERSION_PATCH=5001 --build-arg PACKAGE_RELEASE=1~r2r --build-arg BUILD_PARALLELISM=2 --build-arg VCS_REF= --build-arg BUILD_DATE=2019-11-14T22:17:00Z -t arturklauser/raspberrypi-rstudio-build-env:1.2.5001-buster-buildx -
unknown flag: --platform
See 'docker --help'.
Usage: docker [OPTIONS] COMMAND
ArturKlauser commented
The fact that git log
fails with fatal: not a git repository makes me think that you are running this from a directory which you have created in some other way (maybe cp?) instead of checking out the git repository. If you think this is not the case, paste what's in your directory? ls -la .
Also: build*x*.sh
is only for experimenting with docker's buildx feature. You probably want to use the regular build.sh
instead.
ArturKlauser commented
So it seems that this issue is a duplicate of issue #1 - let's continue the discussion there and close this one.