1

Tengo un Windows Server 2019 donde hay configurado un runner de gitlab, este ya está relacionado con gitlab y ejecuta los pipelines. Pero como parte del pipeline necesito construir una imagen docker y hacer push de la misma, el problema es que no encuentro una imagen de windows que tenga docker instalado, al ejecutarlo por ejemplo con mcr.microsoft.com/windows/servercore:1809_amd64 me devuelve: docker : The term 'docker' is not recognized as the name of a cmdlet,

image: mcr.microsoft.com/windows/servercore:1809_amd64

stages:
  - build
  - deploy
  
before_script:
  - docker login -u $env:REGISTRY_USER -p $env:REGISTRY_PASS $env:REGISTRY_HOST  

build-test:
  tags:
    - windows
  stage: build
  environment:
    name: test
  script:
    - docker build --pull --no-cache -t $env:REGISTRY_HOST/$env:PROJECT_PATH_LOW/$env:CI_ENVIRONMENT_SLUG:$env:VERSION -t $env:REGISTRY_HOST/$env:PROJECT_PATH_LOW/$env:CI_ENVIRONMENT_SLUG:latest -f TestSwarm/Dockerfile .
    - docker push $env:REGISTRY_HOST/$env:PROJECT_PATH_LOW/$env:CI_ENVIRONMENT_SLUG:$env:VERSION
    - docker push $env:REGISTRY_HOST/$env:PROJECT_PATH_LOW/$env:CI_ENVIRONMENT_SLUG:latest
  only:
    - master

0

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Examina otras preguntas con la etiqueta o formula tu propia pregunta.