harness / gitness

Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery.
https://gitness.com
Apache License 2.0
31.89k stars 2.78k forks source link

using pipelines with Docker-in-Docker samples, Error: mount: permission denied #3528

Closed liusd-cn closed 1 month ago

liusd-cn commented 1 month ago

Using pipelines with Docker-in-Docker samples Error: mount: permission denied, Could not mount /sys/kernel/security.

Error Log:

subject=CN=docker:dind server
/certs/server/cert.pem: OK
Certificate request self-signature ok
subject=CN=docker:dind client
/certs/client/cert.pem: OK
iptables v1.8.10 (legacy)
mount: permission denied (are you root?)
Could not mount /sys/kernel/security.
AppArmor detection and --privileged mode might break.
mount: permission denied (are you root?)

Steps To Reproduce

OS: Ubuntu aarch64 GNU/Linux

pipeline:


spec:
  stages:
  - type: ci
    spec:
      volumes:
      - name: dockersock
        spec: {}
        type: temp
      steps:
      - name: dind
        type: background
        spec:
          container:
            image: docker:dind
            privileged: true
          mount:
          - name: dockersock
            path: /var/run

      - name: test
        type: run
        spec:
          container: docker:dind
          mount:
          - name: dockersock
            path: /var/run
          script: |-
            sleep 5
            docker ps -a ```