chore: next release #5

Merged
jon_nfc merged 9 commits from development into master 2023-05-21 06:07:05 +00:00
5 changed files with 53 additions and 41 deletions

View File

@ -5,7 +5,7 @@ include:
ref: development ref: development
file: file:
- .gitlab-ci_common.yaml - .gitlab-ci_common.yaml
- type/docker-image.gitlab-ci.yaml - template/docker-image.gitlab-ci.yaml
variables: variables:
@ -17,7 +17,14 @@ variables:
#JOB_STOP_GIT_PUSH_MIRROR: 'disable for testing' #JOB_STOP_GIT_PUSH_MIRROR: 'disable for testing'
#JOB_STOP_GITLAB_RELEASE: 'disable for testing' #JOB_STOP_GITLAB_RELEASE: 'disable for testing'
DOCKER_IMAGE_BUILD_TARGET_PLATFORMS: "linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6" DOCKER_IMAGE_BUILD_TARGET_PLATFORMS: "linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64,linux/arm/v7"
# Package docker-ce-cli is not available for:
# - linux/arm/v6
# - linux/386
DOCKER_IMAGE_PUBLISH_NAME: $CI_PROJECT_NAME DOCKER_IMAGE_PUBLISH_NAME: $CI_PROJECT_NAME
DOCKER_IMAGE_PUBLISH_REGISTRY: docker.io/nofusscomputing DOCKER_IMAGE_PUBLISH_REGISTRY: docker.io/nofusscomputing
DOCKER_IMAGE_PUBLISH_URL: https://hub.docker.com/r/nofusscomputing/$DOCKER_IMAGE_PUBLISH_NAME DOCKER_IMAGE_PUBLISH_URL: https://hub.docker.com/r/nofusscomputing/$DOCKER_IMAGE_PUBLISH_NAME

View File

@ -1,37 +0,0 @@
FROM debian
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update && apt --fix-broken install \
&& apt install -y libc-bin locales-all
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
git \
gnupg2 \
software-properties-common \
python3 \
python3-pip || true
# Install Docker and qemu
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" && \
apt-get update && apt-get install -y \
docker-buildx-plugin \
docker-ce-cli \
binfmt-support \
qemu-user-static || true
# Write version file
RUN printf "$(docker --version | perl -pe 's/^.*\s(\d+\.\d+\.\d+.*),.*$/$1/')_$(docker buildx version | perl -pe 's/^.*v?(\d+\.\d+\.\d+).*$/$1/')" > /version && \
cat /version
RUN echo "[DEBUG] why arm64 reports no docker 'which docker'=[$(which docker)]"

View File

@ -28,7 +28,7 @@ This project is hosted on [gitlab](https://gitlab.com/nofusscomputing/projects/d
**Development Branch** **Development Branch**
![Gitlab build status - development](https://img.shields.io/badge/dynamic/json?color=ff782e&label=Build&query=0.status&url=https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%2Fprojects%2F45926238%2Fpipelines%3Fref%3Ddevelopment&logo=gitlab&style=plastic) ![branch release version](https://img.shields.io/badge/dynamic/yaml?color=ff782e&logo=gitlab&style=plastic&label=Release&query=%24.commitizen.version&url=https%3A//gitlab.com/nofusscomputing/projects/docker-buildx-qemu-%2Fraw%2Fdevelopment%2F.cz.yaml) ![Gitlab build status - development](https://img.shields.io/badge/dynamic/json?color=ff782e&label=Build&query=0.status&url=https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%2Fprojects%2F45926238%2Fpipelines%3Fref%3Ddevelopment&logo=gitlab&style=plastic) ![branch release version](https://img.shields.io/badge/dynamic/yaml?color=ff782e&logo=gitlab&style=plastic&label=Release&query=%24.commitizen.version&url=https%3A//gitlab.com/nofusscomputing/projects/docker-buildx-qemu%2F-%2Fraw%2Fdevelopment%2F.cz.yaml)
---- ----
<br> <br>
@ -45,6 +45,23 @@ links:
> This is a fork of https://gitlab.com/gdunstone/docker-buildx-qemu, which appears to be a fork of a fork. anyhow, updates are required. Credit to original and derivitive devs/contributors for getting it to the stage they had!! > This is a fork of https://gitlab.com/gdunstone/docker-buildx-qemu, which appears to be a fork of a fork. anyhow, updates are required. Credit to original and derivitive devs/contributors for getting it to the stage they had!!
This docker image enables building of multi-architecture docker builds. It's designed to run within a CI environment.
To use this image within Gitlab CI/CD Pipelines the following as a minimum is required within your `gitlab-ci.yaml` file, specifically the `before_script` section of your `docker buildx build` job:
``` yaml
before_script:
# see: https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1861
# on why this `docker run` is required. without it multiarch support doesnt work.
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- update-binfmts --display
- update-binfmts --enable # Important: Ensures execution of other binary formats is enabled in the kernel
- docker buildx create --driver=docker-container --driver-opt image=moby/buildkit:v0.11.6 --use
- docker buildx inspect --bootstrap
```
When the above is added to the `before_script` section of the docker container build job, Gitlab CI has been initialized for multi-architecture builds.
## Contributing ## Contributing
All contributions for this project must conducted from [Gitlab](https://gitlab.com/nofusscomputing/projects/docker-buildx-qemu). All contributions for this project must conducted from [Gitlab](https://gitlab.com/nofusscomputing/projects/docker-buildx-qemu).

25
dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM --platform=$TARGETPLATFORM debian:11.7-slim
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
git \
gnupg2 \
software-properties-common \
python3 \
python3-pip
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" && \
add-apt-repository "deb http://deb.debian.org/debian bullseye-backports main" && \
apt-get update && apt-get install -y \
docker-buildx-plugin \
docker-ce-cli \
binfmt-support=2.2.1-1+deb11u1 \
qemu-user-static=1:7.2+dfsg-7~bpo11+1