Closed arun-prakash-fokus closed 1 year ago
I don't know how gitlab ci works, but this error usually happens if you don't run the container as --privileged
. Reminder that this is not secure, but there is no other way to run docker in docker without "extra" features.
Anyways, there are better solutions like this https://github.com/nestybox/sysbox
It works for me in general with an priviledged gitlab-runner and when I run /usr/local/bin/startup.sh
in the script section again. Entrypoint might be overwritten as described in GitlabEE Docs
I had also the need for run ubuntu-dind, which is the reason why I landed here by Google search. My constraints are
image: docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
DOCKER_TLS_CERTDIR: ''
DEBIAN_FRONTEND: noninteractive
BAZEL_VERSION: "4.0.0"
services:
- name: docker:dind
alias: docker
stages:
- build
build:
image: ubuntu:20.04
tags:
- k8s-executor
stage: build
script:
- echo "install packages"
- apt-get update && apt-get -y upgrade
- apt-get install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew bash curl wget git openssl make python3-dev python3-pip gcc g++ docker.io
- echo "install bazel"
- wget -q https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64
- chmod +x bazel-${BAZEL_VERSION}-linux-x86_64
- mv bazel-${BAZEL_VERSION}-linux-x86_64 /usr/local/bin/bazel
#... doing things with bazel and build an image to push
I am trying to use your image to run inside a gitlab-ci job as follows:
and get the following console messages:
what am doing wrong? do you have any suggestions?