Verified Commit 47b8b5c4 authored by Alex Thomae's avatar Alex Thomae 👓
Browse files

Enable multi-arch build for ixdotai/qemu



* Rename the variable `QEMU_VERSION` to `QEMU_BUILD_VERSION`
* Add target platforms: `linux/arm64` and `linux/arm/v7`
* Fix `maintainer` tag
Signed-off-by: Alex Thomae's avatarAlex Thomae <git@alex.thom.ae>
parent 0fe2ac29
Pipeline #194803752 passed with stages
in 39 seconds
variables:
DOCKER_DRIVER: overlay2
TARGET_PLATFORM: linux/amd64
TARGET_PLATFORM: linux/amd64,linux/arm64,linux/arm/v7
# Docker Hub
DOCKERHUB_REPO_NAME: 'qemu'
......
......@@ -38,13 +38,13 @@ build:{{ versions[version].version }}:
refs:
- tags
script:
- export QEMU_VERSION="{{ versions[version].major }}.{{ versions[version].minor }}.{{ versions[version].patch }}"
- export QEMU_BUILD_VERSION="{{ versions[version].major }}.{{ versions[version].minor }}.{{ versions[version].patch }}"
- export QEMU_SHORT_VERSION="{{ versions[version].major }}.{{ versions[version].minor }}"
- |
if [ "${CI_COMMIT_REF_NAME}" == "master" ]; then \
export TAG="master-${QEMU_VERSION}"; \
export TAG="master-${QEMU_BUILD_VERSION}"; \
else \
export TAG="dev-${QEMU_VERSION}-${CI_COMMIT_SHORT_SHA}"; \
export TAG="dev-${QEMU_BUILD_VERSION}-${CI_COMMIT_SHORT_SHA}"; \
fi
- |
docker buildx build \
......@@ -52,8 +52,8 @@ build:{{ versions[version].version }}:
--progress=plain \
--pull \
--push \
--cache-from=${CI_REGISTRY_IMAGE}:cache-${QEMU_VERSION} \
--cache-to=${CI_REGISTRY_IMAGE}:cache-${QEMU_VERSION} \
--cache-from=${CI_REGISTRY_IMAGE}:cache-${QEMU_BUILD_VERSION} \
--cache-to=${CI_REGISTRY_IMAGE}:cache-${QEMU_BUILD_VERSION} \
--tag "${CI_REGISTRY_IMAGE}:${TAG}" \
--tag "${DOCKERHUB_IMAGE}:${TAG}" \
{{ versions[version].major }}.{{ versions[version].minor }}/
......@@ -68,22 +68,22 @@ publish:{{ versions[version].version }}:
refs:
- tags
script:
- export QEMU_VERSION="{{ versions[version].major }}.{{ versions[version].minor }}.{{ versions[version].patch }}"
- export QEMU_BUILD_VERSION="{{ versions[version].major }}.{{ versions[version].minor }}.{{ versions[version].patch }}"
- export QEMU_SHORT_VERSION="{{ versions[version].major }}.{{ versions[version].minor }}"
- |
docker buildx build \
--platform={{ target_platform }} \
--progress=plain \
--pull \
--cache-from=${CI_REGISTRY_IMAGE}:cache-${QEMU_VERSION} \
--cache-to=${CI_REGISTRY_IMAGE}:cache-${QEMU_VERSION} \
--tag "${CI_REGISTRY_IMAGE}:${QEMU_VERSION}" \
--cache-from=${CI_REGISTRY_IMAGE}:cache-${QEMU_BUILD_VERSION} \
--cache-to=${CI_REGISTRY_IMAGE}:cache-${QEMU_BUILD_VERSION} \
--tag "${CI_REGISTRY_IMAGE}:${QEMU_BUILD_VERSION}" \
--tag "${CI_REGISTRY_IMAGE}:${QEMU_SHORT_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_BUILD_VERSION}" \
--tag="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_SHORT_VERSION}" \
--tag "${DOCKERHUB_IMAGE}:${QEMU_VERSION}" \
--tag "${DOCKERHUB_IMAGE}:${QEMU_BUILD_VERSION}" \
--tag "${DOCKERHUB_IMAGE}:${QEMU_SHORT_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_BUILD_VERSION}" \
--tag="${DOCKERHUB_IMAGE}:${CI_COMMIT_REF_NAME}-${QEMU_SHORT_VERSION}" \
{%- if versions[version].get('latest') %}
--tag="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}" \
......
......@@ -5,13 +5,13 @@
#
FROM debian:stable-slim
LABEL maintainer="git@alex.thom.ae" \
LABEL maintainer="docker@ix.ai" \
ai.ix.repository="ix.ai/docker-qemu"
# https://wiki.qemu.org/SecurityProcess
# Michael Roth
ENV QEMU_KEYS="CEACC9E15534EBABB82D3FA03353C9CEF108B584" \
QEMU_VERSION="4.1.1" \
QEMU_BUILD_VERSION="4.1.1" \
QEMU_URL="https://download.qemu.org/qemu-4.1.1.tar.xz"
COPY Dockerfile *.patch /qemu-patches/
......
......@@ -72,7 +72,7 @@ apt-get install -y --no-install-recommends \
xfslibs-dev \
zlib1g-dev
if echo "${QEMU_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
if echo "${QEMU_BUILD_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
export CONFIGURE_EXTRA_OPTIONS=" --enable-rng-none"
fi
./configure \
......
......@@ -5,13 +5,13 @@
#
FROM debian:stable-slim
LABEL maintainer="git@alex.thom.ae" \
LABEL maintainer="docker@ix.ai" \
ai.ix.repository="ix.ai/docker-qemu"
# https://wiki.qemu.org/SecurityProcess
# Michael Roth
ENV QEMU_KEYS="CEACC9E15534EBABB82D3FA03353C9CEF108B584" \
QEMU_VERSION="4.2.1" \
QEMU_BUILD_VERSION="4.2.1" \
QEMU_URL="https://download.qemu.org/qemu-4.2.1.tar.xz"
COPY Dockerfile *.patch /qemu-patches/
......
......@@ -72,7 +72,7 @@ apt-get install -y --no-install-recommends \
xfslibs-dev \
zlib1g-dev
if echo "${QEMU_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
if echo "${QEMU_BUILD_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
export CONFIGURE_EXTRA_OPTIONS=" --enable-rng-none"
fi
./configure \
......
......@@ -5,13 +5,13 @@
#
FROM debian:stable-slim
LABEL maintainer="git@alex.thom.ae" \
LABEL maintainer="docker@ix.ai" \
ai.ix.repository="ix.ai/docker-qemu"
# https://wiki.qemu.org/SecurityProcess
# Michael Roth
ENV QEMU_KEYS="CEACC9E15534EBABB82D3FA03353C9CEF108B584" \
QEMU_VERSION="5.0.1" \
QEMU_BUILD_VERSION="5.0.1" \
QEMU_URL="https://download.qemu.org/qemu-5.0.1.tar.xz"
COPY Dockerfile *.patch /qemu-patches/
......
......@@ -72,7 +72,7 @@ apt-get install -y --no-install-recommends \
xfslibs-dev \
zlib1g-dev
if echo "${QEMU_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
if echo "${QEMU_BUILD_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
export CONFIGURE_EXTRA_OPTIONS=" --enable-rng-none"
fi
./configure \
......
......@@ -5,13 +5,13 @@
#
FROM debian:stable-slim
LABEL maintainer="git@alex.thom.ae" \
LABEL maintainer="docker@ix.ai" \
ai.ix.repository="ix.ai/docker-qemu"
# https://wiki.qemu.org/SecurityProcess
# Michael Roth
ENV QEMU_KEYS="CEACC9E15534EBABB82D3FA03353C9CEF108B584" \
QEMU_VERSION="5.1.0" \
QEMU_BUILD_VERSION="5.1.0" \
QEMU_URL="https://download.qemu.org/qemu-5.1.0.tar.xz"
COPY Dockerfile *.patch /qemu-patches/
......
......@@ -72,7 +72,7 @@ apt-get install -y --no-install-recommends \
xfslibs-dev \
zlib1g-dev
if echo "${QEMU_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
if echo "${QEMU_BUILD_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
export CONFIGURE_EXTRA_OPTIONS=" --enable-rng-none"
fi
./configure \
......
FROM debian:stable-slim
LABEL maintainer="git@alex.thom.ae" \
LABEL maintainer="docker@ix.ai" \
ai.ix.repository="ix.ai/docker-qemu"
# https://wiki.qemu.org/SecurityProcess
# Michael Roth
ENV QEMU_KEYS="CEACC9E15534EBABB82D3FA03353C9CEF108B584" \
QEMU_VERSION="{{ .version }}" \
QEMU_BUILD_VERSION="{{ .version }}" \
QEMU_URL="{{ .url }}"
COPY Dockerfile *.patch /qemu-patches/
......
......@@ -11,6 +11,7 @@ This is a fork of [tianon/docker-qemu](https://github.com/tianon/docker-qemu).
Notable differences, beyond the automated build using GitLab CI:
* Multi-arch build: `linux/amd64`, `linux/arm64`, `linux/arm/v7`
* Adds full support for RBD (CEPH) volumes - including libraries
* Drops the `user` targets
* Drops `xen` support
......
......@@ -72,7 +72,7 @@ apt-get install -y --no-install-recommends \
xfslibs-dev \
zlib1g-dev
if echo "${QEMU_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
if echo "${QEMU_BUILD_VERSION}" | grep -vE "^(4\.|5\.0\.).*"; then \
export CONFIGURE_EXTRA_OPTIONS=" --enable-rng-none"
fi
./configure \
......
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