#1708  Running non OneDev Docker image in CI fails
Closed
juliette opened 4 months ago

Hello, I have OneDev running through Docker with access to the Docker socket. But whenever I try to build with an external CI image I get the error of cp: cannot stat '/root/auth-info/.': Permission denied in the job pipeline for the step that runs a command through a Docker image. Is there anything I can do? This also happens when I'm running an agent outside of OneDev.

Robin Shen commented 4 months ago

I start OneDev on an ubuntu box via docker container, add a new project, and configure a ci job running a simple command on alpine image with the default job executor. And things work fine.

Please tell me the detailed reproduing steps at your side.

juliette commented 4 months ago

Docker Host: MacOS Docker Compose:

name: onedev 
services:
    server:
        container_name: onedev
        restart: always
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock
            - ./onedev:/opt/onedev
        ports:
            - 3000:6610
            - 222:6611
        image: 1dev/server 

Docker Image Running On Pipeline: cimg/android:2023.12

Robin Shen commented 4 months ago

Turns out that the container "cimg/android:2023.12" runs as non-root user which OneDev is not suported yet.

There is an improvement request for this: #899 You may watch it to get notified when there are any progresses.

juliette commented 4 months ago

Okay, thank you so much for your help!

juliette changed state to 'Closed' 4 months ago
Previous Value Current Value
Open
Closed
Robin Shen commented 2 months ago

@juliette Build #4785 (10.3.0) is able to run container with non-root user. For image cimg/android:2023.12, you may specify property run as as 1001:1002 in more settings of the command step.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Affected Versions
9.4.8
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
onedev/server#1708
Please wait...
Page is in error, reload to recover