Problem to solve
When I try to build my ASP .NET application with Blazor with Docker on Gitlab CI, the workload restore fails:
I tried manually downloading the link and it seems like there is an issue with SSL connection:
Steps to reproduce
Just build an image from a Dockerfile with Gitlab CI (I used mcr.microsoft.com/dotnet/sdk:8.0 as a base) and run curl https://nuget.org/v3/index.json
Limiting curl to IPv4 (using the -4 switch) or TLS to v1.2 (--tlsv1.2) seems to help. Unfortunately I canβt do the same with dotnet workload restore. I tried the DOTNET_SYSTEM_NET_DISABLEIPV6 variable to restrict it to IPv4 but without success.
Configuration
This is my .gitlab-ci.yml:
image: ubuntu
stages:
- release
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
CONTAINER_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
release-docker-image:amd64:
stage: release
image: docker:29
services:
- docker:29-dind
only:
- tags
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
--build-arg VCS_REF=$CI_COMMIT_SHORT_SHA
--build-arg VCS_SRC="https://gitlab.com/gaspis/gaspis/tree/$SOURCE_COMMIT"
--build-arg VERSION=$CI_COMMIT_TAG
-t $CONTAINER_IMAGE -f ./Dockerfile .
- docker push $CONTAINER_IMAGE
Versions
Please select whether options apply, and add the version information.
- Self-managed
-
GitLab.comSaaS - Dedicated
- Self-hosted Runners

