4👍
Change your Dockerfile:
WORKDIR /app
RUN useradd -ms /bin/bash celery
COPY . /app
RUN chown -R celery:celery /app
USER celery
And set C_FORCE_ROOT=false
Or, you can force container to run as non-user:
docker run --user 1000 -v /root/secrets.txt:/tmp/secrets.txt <img>
3👍
- If you want to specify a
uid
, you use themulti
command, notworker
, and you run themulti
command as root. If you want to useworker
just run the command withoutuid
. - You can also just set the C_FORCE_ROOT env variable to
1
and run this as root in docker if this is just for local development.
n.b., you may also need to update file permissions in case your celery task writes anything to the filesystem (like log files, or temp files).
👤2ps
- DateTimeField received a naive datetime
- Sometimes request.session.session_key is None
- Django HTML E-mail template doesn't load css in the e-mail
- Python Social Auth Django template example
Source:stackexchange.com