Giter Club home page Giter Club logo

Comments (4)

JoeyLearnsToCode avatar JoeyLearnsToCode commented on June 2, 2024

之前苦寻几天都没有进展,昨天提了issue之后却自行找到了方案:
alpine系统中crond和crontab都是对busybox的引用,要让crontab可以被非root用户执行,需要在Dockerfile中以root用户执行这2个命令:chmod 4755 /bin/buxyboxchmod 4755 /usr/bin/crontab
然后,在docker运行时就可以非root用户来运行了(当然,需要用户对Dockerfile做修改(各种文件路径需要修改权限))。
总之,要用非root用户运行青龙并不简单,除非万不得已否则不推荐。

参考:https://unix.stackexchange.com/questions/605653/file-permissions-what-is-the-difference-between-755-and-4755

from qinglong.

whyour avatar whyour commented on June 2, 2024

@JoeyLearnsToCode debian 版本会有问题吗

from qinglong.

JoeyLearnsToCode avatar JoeyLearnsToCode commented on June 2, 2024

@JoeyLearnsToCode debian 版本会有问题吗

还没试,明天尝试下

from qinglong.

JoeyLearnsToCode avatar JoeyLearnsToCode commented on June 2, 2024

@JoeyLearnsToCode debian 版本会有问题吗

debian版本相对alpine版本兼容非 root 用户更简单一些,没有crontab的奇怪问题,只需要在 Dockerfile 里以 root 用户给非root用户赋予一些目录的权限即可。

我是基于debian 分支的 Dockerfile来进行修改的,发现两个问题:

  • 我感觉 debian 分支的 Dockerfile 中 QL_BRANCH 应该是 debian,用 develop 启动会有问题
  • apt install 没有安装 cron,在我的尝试中会导致无法启动,添加后就可以了

from qinglong.

Related Issues (20)

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.