Handling CI with GitLab and Azure Kubernetes

7/29/2019

Building a docker image using Docker in Docker is not working.

before_script:

  - apt-get update && apt-get install -y apt-transport-https
  - apk add --update curl && rm -rf /var/cache/apk/
  - curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl  
  - chmod +x ./kubectl
  - mv ./kubectl /usr/local/bin/kubectl
build:
  stage: build
  image: docker:dind
  services:
    - docker:dind
  variables:
    DOCKER_DRIVER: overlay2
    DOCKER_HOST: tcp://127.0.0.1:2376    
  script:
    - kubectl version
    - docker info

Getting: Client sent an HTTP request to an HTTPS server

-- Mark Richardson
azure
azure-kubernetes
docker
gitlab
kubernetes

0 Answers