Verified Commit 4f406e26 authored by Alex Thomae's avatar Alex Thomae 👓
Browse files

Enable multiarch build for ixdotai/qemu-ceph

parent cd0056b2
Pipeline #194818104 passed with stage
in 2 minutes and 44 seconds
......@@ -5,7 +5,7 @@ variables:
DOCKER_HOST: tcp://docker:2376/
DOCKER_DRIVER: overlay2
BUILDKIT_INLINE_CACHE: '1'
TARGET_PLATFORM: 'linux/amd64'
TARGET_PLATFORM: 'linux/amd64,linux/arm64,linux/arm/v7'
# Docker Hub
DOCKERHUB_REPO_NAME: 'qemu-ceph'
# Image options
......@@ -41,10 +41,10 @@ build:
script:
- export TAG_PREFIX="master"
- if [ ! "${CI_COMMIT_REF_NAME}" == "master" ]; then export TAG_PREFIX="dev"; fi
- export QEMU_VERSION="${QEMU_VERSION:-$QEMU_DEFAULT_VERSION}"
- export QEMU_BUILD_VERSION="${QEMU_BUILD_VERSION:-$QEMU_DEFAULT_VERSION}"
- export CEPH_VERSION="${CEPH_VERSION:-$CEPH_DEFAULT_VERSION}"
- export QEMU_SHORT_VERSION=$(echo ${QEMU_VERSION}|awk -F. '{ print $1"."$2 }')
- export QEMU_SHORTEST_VERSION=$(echo ${QEMU_VERSION}|awk -F. '{ print $1 }')
- export QEMU_SHORT_VERSION=$(echo ${QEMU_BUILD_VERSION}|awk -F. '{ print $1"."$2 }')
- export QEMU_SHORTEST_VERSION=$(echo ${QEMU_BUILD_VERSION}|awk -F. '{ print $1 }')
- export DOCKERHUB_IMAGE="${DOCKERHUB_REPO_PREFIX}/${DOCKERHUB_REPO_NAME}"
- |
docker buildx build \
......@@ -52,16 +52,16 @@ build:
--progress=plain \
--pull \
--push \
--build-arg QEMU_VERSION="${QEMU_VERSION}" \
--build-arg QEMU_BUILD_VERSION="${QEMU_BUILD_VERSION}" \
--build-arg CEPH_VERSION="${CEPH_VERSION}" \
--cache-from=${CI_REGISTRY_IMAGE}:cache \
--cache-to=${CI_REGISTRY_IMAGE}:cache \
--tag="${CI_REGISTRY_IMAGE}:${TAG_PREFIX}-${QEMU_VERSION}-${CEPH_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${CI_REGISTRY_IMAGE}:${TAG_PREFIX}-${QEMU_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${CI_REGISTRY_IMAGE}:${TAG_PREFIX}-${QEMU_BUILD_VERSION}-${CEPH_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${CI_REGISTRY_IMAGE}:${TAG_PREFIX}-${QEMU_BUILD_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${CI_REGISTRY_IMAGE}:${TAG_PREFIX}-${QEMU_SHORT_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${CI_REGISTRY_IMAGE}:${TAG_PREFIX}-${QEMU_SHORTEST_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${DOCKERHUB_IMAGE}:${TAG_PREFIX}-${QEMU_VERSION}-${CEPH_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${DOCKERHUB_IMAGE}:${TAG_PREFIX}-${QEMU_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${DOCKERHUB_IMAGE}:${TAG_PREFIX}-${QEMU_BUILD_VERSION}-${CEPH_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${DOCKERHUB_IMAGE}:${TAG_PREFIX}-${QEMU_BUILD_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${DOCKERHUB_IMAGE}:${TAG_PREFIX}-${QEMU_SHORT_VERSION}-${CI_COMMIT_SHORT_SHA}" \
--tag="${DOCKERHUB_IMAGE}:${TAG_PREFIX}-${QEMU_SHORTEST_VERSION}-${CI_COMMIT_SHORT_SHA}" \
.
......@@ -74,10 +74,10 @@ publish:
refs:
- tags
script:
- export QEMU_VERSION="${QEMU_VERSION:-$QEMU_DEFAULT_VERSION}"
- export QEMU_BUILD_VERSION="${QEMU_BUILD_VERSION:-$QEMU_DEFAULT_VERSION}"
- export CEPH_VERSION="${CEPH_VERSION:-$CEPH_DEFAULT_VERSION}"
- export QEMU_SHORT_VERSION=$(echo ${QEMU_VERSION}|awk -F. '{ print $1"."$2 }')
- export QEMU_SHORTEST_VERSION=$(echo ${QEMU_VERSION}|awk -F. '{ print $1 }')
- export QEMU_SHORT_VERSION=$(echo ${QEMU_BUILD_VERSION}|awk -F. '{ print $1"."$2 }')
- export QEMU_SHORTEST_VERSION=$(echo ${QEMU_BUILD_VERSION}|awk -F. '{ print $1 }')
- export DOCKERHUB_IMAGE="${DOCKERHUB_REPO_PREFIX}/${DOCKERHUB_REPO_NAME}"
- |
docker buildx build \
......@@ -85,20 +85,20 @@ publish:
--progress=plain \
--pull \
--push \
--build-arg QEMU_VERSION="${QEMU_VERSION}" \
--build-arg QEMU_BUILD_VERSION="${QEMU_BUILD_VERSION}" \
--build-arg CEPH_VERSION="${CEPH_VERSION}" \
--cache-from=${CI_REGISTRY_IMAGE}:cache \
--cache-to=${CI_REGISTRY_IMAGE}:cache \
--tag="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_VERSION}-${CEPH_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${QEMU_VERSION}-${CEPH_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${QEMU_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_BUILD_VERSION}-${CEPH_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${QEMU_BUILD_VERSION}-${CEPH_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${QEMU_BUILD_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${QEMU_SHORT_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${QEMU_SHORTEST_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}" \
--tag="${CI_REGISTRY_IMAGE}:latest" \
--tag="${DOCKERHUB_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_VERSION}-${CEPH_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${QEMU_VERSION}-${CEPH_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${QEMU_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_BUILD_VERSION}-${CEPH_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${QEMU_BUILD_VERSION}-${CEPH_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${QEMU_BUILD_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${QEMU_SHORT_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${QEMU_SHORTEST_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${CI_COMMIT_REF_NAME}" \
......
ARG QEMU_VERSION="5.1.0"
ARG QEMU_BUILD_VERSION="5.1.0"
FROM registry.gitlab.com/ix.ai/docker-qemu:${QEMU_VERSION}
FROM registry.gitlab.com/ix.ai/docker-qemu:${QEMU_BUILD_VERSION}
LABEL maintainer="docker@ix.ai" \
ai.ix.repository="ix.ai/docker-qemu-ceph/"
......
......@@ -7,7 +7,9 @@
# docker-qemu-ceph
A docker image, based on [ix.ai/docker-qemu](https://gitlab.com/ix.ai/docker-qemu), with added CEPH common tools
A docker image, based on [ixdotai/qemu:5.1.0](https://ix.ai/docker-qemu), with added CEPH common tools
Multi-arch build: `linux/amd64`, `linux/arm64`, `linux/arm/v7`
## Usage
......@@ -23,6 +25,9 @@ The following additional environment variables are implemented:
* `CEPH_SNAP` - the snapshot to use as a base for the image (example: `rbd/alpine@original`)
* `CEPH_CLONE` - the name of the new clone (example: `rbd/alpine-test`)
* `CEPH_TRASH_CLONE` - set to `0` it will skip the trash command on exit (default: `1`)
* `CEPH_TRASH_CLONE_IF_EXISTS` - set to `1` it will trash an existing clone on startup (default: `0`)
* `CEPH_IGNORE_CLONE_EXISTS` - set to `1` it will re-use an existing clone (default: `0`)
* `CEPH_SKIP_CREATE_CLONE` - set to `1` it will not create a clone at startup (default: `0`)
**Note**: With [ixdotai/qemu:v0.2.0](https://gitlab.com/ix.ai/docker-qemu/-/releases/v0.2.0) a new variable called `QEMU_NO_QMP` was introduced. This variable is ignored by this image.
......@@ -92,7 +97,7 @@ The following tag formats are used by this docker image:
### Immutable tags:
* `v0.0.5-5.1.0-octopus` - the git tag, the QEMU version, the CEPH version
* `v0.0.5` - the git tag
* Tags starting with `master` or `dev`, finishing with a short SHA, are development tags
* Tags starting with `master` or `dev`, are development tags
### Updated tags:
* `5.1.0-octopus` - the QEMU version, the CEPH version
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment