Git Product home page Git Product logo

Comments (2)

cruizba avatar cruizba commented on August 23, 2024

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

from ubuntu-dind.

eumel8 avatar eumel8 commented on August 23, 2024

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

  • running bazel on Ubuntu which is not available at Alpine
  • build docker image, based on Docker in Docker architecture while running in Gitlab Docker runner with an Alpine image.
    At the end my .gitlab-ci.yml was something like that:
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

from ubuntu-dind.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.