mirror of https://github.com/openwrt/docker.git
support ARCH tagging
For the rootfs containers it can be of interest to run a root container based on used architecture. Say a CI builds a specific architecture and a container should run the specific packages. Instead of maintaining the mapping upstream this should happen via container tags. Signed-off-by: Paul Spooren <mail@aparcar.org>pull/64/head
parent
2c562e71c0
commit
55df8c7cef
|
@ -1,18 +1,18 @@
|
|||
|
||||
deploy-rootfs_x86-64:
|
||||
extends: .deploy-rootfs
|
||||
variables:
|
||||
TARGET: x86-64
|
||||
|
||||
ARCH: x86_64
|
||||
|
||||
deploy-rootfs_armvirt-32:
|
||||
extends: .deploy-rootfs
|
||||
variables:
|
||||
TARGET: armvirt-32
|
||||
|
||||
ARCH: arm_cortex-a15_neon-vfpv4
|
||||
|
||||
deploy-rootfs_armvirt-64:
|
||||
extends: .deploy-rootfs
|
||||
variables:
|
||||
TARGET: armvirt-64
|
||||
ARCH: aarch64_generic
|
||||
|
||||
|
|
|
@ -8,7 +8,14 @@ DOCKERFILE="${DOCKERFILE:-Dockerfile}"
|
|||
cp "$DOCKERFILE" ./build/
|
||||
docker build -t "$DOCKER_IMAGE:$TARGET-$BRANCH" -f "./build/$DOCKERFILE" ./build
|
||||
|
||||
if [ -n "$ARCH" ]; then
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$BRANCH" "$DOCKER_IMAGE:$ARCH-$BRANCH"
|
||||
fi
|
||||
|
||||
if [ "$BRANCH" == "master" ]; then
|
||||
if [ -n "$ARCH" ]; then
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$BRANCH" "$DOCKER_IMAGE:$ARCH"
|
||||
fi
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$BRANCH" "$DOCKER_IMAGE:$TARGET"
|
||||
if [ "$TARGET" == "x86-64" ]; then
|
||||
docker tag "$DOCKER_IMAGE:$TARGET-$BRANCH" "$DOCKER_IMAGE:latest"
|
||||
|
|
Loading…
Reference in New Issue