I updated Gitlab from 15.3 to 15.8 since then the pushed images don’t arrive complete in the registry.
I build and push it with - docker buildx build . --push --platform $BUILDPLATFORM --tag $CONTAINER_RELEASE_IMAGE --tag $CONTAINER_VERSION_IMAGE:$VERSION
but after the update in the registry it only shows
and the job ends without an error. even in the gitlab log i don’t find an error.
I figured out if i build it with - docker buildx build . --platform $BUILDPLATFORM --tag $CONTAINER_RELEASE_IMAGE --tag $CONTAINER_VERSION_IMAGE:$VERSION -o type=docker - docker push $CONTAINER_RELEASE_IMAGE ...
it works but with that method i can only build an single binary image. So that is not really a solution for me.
Additional important infos:
I m using self-managed / hosted gitlab instances, and i have the problem on both.
For building i using docker runner also with the newest version (15.8).
I run gitlab on an own vm, and the runner runns on an docker host on another vm.
Gitlabs url`s are reachable over a proxy with ssl offloading.
my
.gitlab-ci.yml
image: docker:latest
services:
- name: docker:dind
command: ["--experimental"]
variables:
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY/trackhe/ssl-share:latest
CONTAINER_VERSION_IMAGE: $CI_REGISTRY/trackhe/ssl-share
BUILDPLATFORM: linux/arm64,linux/amd64
DOCKER_TLS_CERTDIR: ''
stages:
- buildx
- build_image
buildx:
stage: buildx
image: docker:git
variables:
GIT_STRATEGY: none
artifacts:
paths:
- buildx
expire_in: 1 hour
services:
- docker:dind
script:
- export DOCKER_BUILDKIT=1
- git clone https://github.com/docker/buildx ./docker-buildx
- docker build --platform=local -o . ./docker-buildx
build-image-job:
stage: build_image
image: docker
before_script:
- mkdir -p ~/.docker/cli-plugins
- mv buildx ~/.docker/cli-plugins/docker-buildx
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- apk add jq git
- export VERSION=$(jq -r .version package.json)
- docker buildx create --use --name buildx-builder
- docker buildx inspect --bootstrap
- export BUILDER=$(docker ps | grep buildkitd | cut -f1 -d' ')
- docker cp $CI_PROJECT_DIR/site/download/CA.crt $BUILDER:/usr/local/share/ca-certificates/CA.crt
- docker exec $BUILDER cat /usr/local/share/ca-certificates/CA.crt >> /etc/ssl/certs/ca-certificates.crt
- docker exec $BUILDER update-ca-certificates
script:
- echo "Building Docker image."
- docker buildx build . --push --platform $BUILDPLATFORM --tag $CONTAINER_RELEASE_IMAGE --tag $CONTAINER_VERSION_IMAGE:$VERSION
- echo "Done."
and my girlab.rb
external_url "https://lab.***"
nginx['enable'] = true
nginx['listen_https'] = false
nginx['listen_port'] = 80
gitlab_rails['registry_enabled'] = true
registry_external_url "https://registry.***"
registry_nginx['enable'] = true
registry_nginx['listen_https'] = false
registry_nginx['listen_port'] = 5005
gitlab_pages['enable'] = true
pages_external_url "https://pages.***/"
pages_nginx['enable'] = true
pages_nginx['listen_https'] = false
pages_nginx['listen_port'] = 8180
gitlab_rails['gitlab_shell_ssh_port'] = 22
gitlab_rails['packages_enabled'] = true
gitlab_rails['gitlab_default_theme'] = 2
letsencrypt['enable'] = false
for troubleshooting
used google
the forum, searched in existing issues etc.
tried a lot around with docker:dind and without docker:dind / mount docker as volume
tried other commands to build and push.
If i try to build it locally and push it with the same command it works without any problem.