Unable to run as docker container (OD-1159)
Gurpal2000 opened 3 years ago

Log explains it

root@vmdocker:/home/onedev# docker run -t --name onedev --rm -v /var/run/docker.sock:/var/run/docker.sock -v /home/onedev:/opt/onedev -p 6610:6610 -p 6611:6611 1dev/server
INFO  - Launching application from '/app'...
INFO  - Starting server...
ERROR - Invalid OneDev installation directory: /opt/onedev, make sure you are specifying the top level installation directory (it contains sub directories such as "bin", "boot", "conf", etc)
INFO  - Stopping server...

lsb_release -a says

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal
  • Robin Shen commented 3 years ago

    Just tried and it works. Please make sure that /home/onedev is empty initially. It is data directory used by onedev.

  • Gurpal2000 commented 3 years ago
    root@vmdocker:/home/onedev# ls -lsa
    total 20
    4 drwxr-xr-x 2 onedev onedev 4096 Jan 28 22:59 .
    4 drwxr-xr-x 7 root   root   4096 Jan 28 22:59 ..
    4 -rw-r--r-- 1 onedev onedev  220 Jan 28 22:59 .bash_logout
    4 -rw-r--r-- 1 onedev onedev 3771 Jan 28 22:59 .bashrc
    4 -rw-r--r-- 1 onedev onedev  807 Jan 28 22:59 .profile
    
    
  • Gurpal2000 commented 3 years ago

    root@vmdocker:/home/onedev# docker --version Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1

    Mind you, this is docker in a VM on Proxmox VE. Should it matter?

  • Robin Shen commented 3 years ago

    OneDev expects nothing in the directory, even if hidden files. Please remove them all, or create a sub directory, for instance /home/onedev/data to be mounted into OneDev.

  • Gurpal2000 commented 3 years ago
    root@vmdocker:/home/onedev# sudo su - onedev
    onedev@vmdocker:~$ pwd
    /home/onedev
    onedev@vmdocker:~$ mkdir data
    onedev@vmdocker:~$ exit
    logout
    root@vmdocker:/home/onedev# docker run -t --name onedev --rm -v /var/run/docker.sock:/var/run/docker.sock -v /home/onedev/data:/opt/onedev -p 6610:6610 -p 6611:6611 1dev/server
    INFO  - Launching application from '/app'...
    INFO  - Starting server...
    INFO  - Populating /opt/onedev...
    INFO  - *********** Successfully populated /opt/onedev ************
    INFO  - Stopping server...
    23:45:08 INFO  i.onedev.commons.bootstrap.Bootstrap - Launching application from '/opt/onedev'...
    23:45:09 INFO  io.onedev.commons.loader.AppLoader - Starting server...
    23:45:23 WARN  io.onedev.server.OneDev - Please set up the server at http://localhost:6610
    

    Excellent, thanks!

  • Robin Shen changed state to 'Closed' 3 years ago
    Previous Value Current Value
    Open
    Closed
  • Robin Shen commented 3 years ago

    Glad to see it is working. Let me know if you have any other issues using OneDev.

issue 1/1
Type
Question
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
OD-1159
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover