chore: next release #5
@ -5,7 +5,7 @@ include:
|
||||
ref: development
|
||||
file:
|
||||
- .gitlab-ci_common.yaml
|
||||
- type/docker-image.gitlab-ci.yaml
|
||||
- template/docker-image.gitlab-ci.yaml
|
||||
|
||||
|
||||
variables:
|
||||
@ -17,7 +17,14 @@ variables:
|
||||
#JOB_STOP_GIT_PUSH_MIRROR: '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_REGISTRY: docker.io/nofusscomputing
|
||||
DOCKER_IMAGE_PUBLISH_URL: https://hub.docker.com/r/nofusscomputing/$DOCKER_IMAGE_PUBLISH_NAME
|
||||
|
||||
|
||||
|
||||
|
||||
|
37
Dockerfile
37
Dockerfile
@ -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)]"
|
19
README.md
19
README.md
@ -28,7 +28,7 @@ This project is hosted on [gitlab](https://gitlab.com/nofusscomputing/projects/d
|
||||
|
||||
**Development Branch**
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
----
|
||||
<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 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
|
||||
All contributions for this project must conducted from [Gitlab](https://gitlab.com/nofusscomputing/projects/docker-buildx-qemu).
|
||||
|
25
dockerfile
Normal file
25
dockerfile
Normal 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
|
Submodule gitlab-ci updated: 18a2808787...588956b27e
Reference in New Issue
Block a user