mirror of https://github.com/openwrt/docker.git
docker-build: Fix compatibility with older Docker versions
parent
a7c9b69238
commit
2176ce8311
|
@ -3,7 +3,10 @@
|
|||
set -ex
|
||||
|
||||
DOCKERFILE="${DOCKERFILE:-Dockerfile}"
|
||||
docker build -t "$DOCKER_IMAGE:$TARGET-$BRANCH" -f "$DOCKERFILE" ./build
|
||||
# Copy Dockerfile inside build context to support older Docker versions
|
||||
# See https://github.com/docker/cli/pull/886
|
||||
cp "$DOCKERFILE" ./build/
|
||||
docker build -t "$DOCKER_IMAGE:$TARGET-$BRANCH" -f "./build/$DOCKERFILE" ./build
|
||||
|
||||
if [ "$BRANCH" == "master" ]; then
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$BRANCH" "$DOCKER_IMAGE:$TARGET"
|
||||
|
|
Loading…
Reference in New Issue