Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help]: Change docker container user chown maintenance issue #857

Closed
2 tasks done
JaneX8 opened this issue Nov 1, 2021 · 3 comments
Closed
2 tasks done

[Help]: Change docker container user chown maintenance issue #857

JaneX8 opened this issue Nov 1, 2021 · 3 comments

Comments

@JaneX8
Copy link

JaneX8 commented Nov 1, 2021

📝 Describe your problem

Currently docker exec uptime whoami results in root. I want to run this whole container as a different user using this dockerfile.

FROM louislam/uptime-kuma:1
RUN adduser --system --group uptime
USER uptime

But I get a bunch of:

==> Performing startup jobs and maintenance tasks
chown: changing ownership of '/app/data/kuma.db': Operation not permitted
chown: changing ownership of '/app/data/kuma.db-wal.bak20211022112928': Operation not permitted
chown: changing ownership of '/app/data/kuma.db-wal.bak20211101090108': Operation not permitted
chown: changing ownership of '/app/data/kuma.db-shm.bak20211101090108': Operation not permitted
chown: changing ownership of '/app/data/kuma.db.bak20211022112928': Operation not permitted
chown: changing ownership of '/app/data/kuma.db.bak20211101090108': Operation not permitted
chown: changing ownership of '/app/data/kuma.db.bak0': Operation not permitted
chown: changing ownership of '/app/data/kuma.db-wal.bak0': Operation not permitted
chown: changing ownership of '/app/data/kuma.db-shm.bak20211022112928': Operation not permitted
chown: changing ownership of '/app/data/upload': Operation not permitted
chown: changing ownership of '/app/data/error.log': Operation not permitted
chown: changing ownership of '/app/data/kuma.db-shm.bak0': Operation not permitted
chown: changing ownership of '/app/data': Operation not permitted

This is because the user is switched and then apparently a miantenance task starts doing chown commands. How do I disable this task? Because I want to run it before my USER line instead. Something like

RUN adduser --system --group uptime && \
    mkdir -p /app/data && \
    chown -R uptime:uptime /app
USER uptime

🐻 Uptime-Kuma version

1

💻 Operating System

Ubuntu 20

🌐 Browser

Chrome

🐋 Docker

No response

🏷️ Docker Image Tag

louislam/uptime-kuma:1

🟩 NodeJS Version

No response

⚠️ Please verify that this question has NOT been raised before.

  • I checked and didn't find similar question

🛡️ Security Policy

@JaneX8 JaneX8 added the help label Nov 1, 2021
@JaneX8 JaneX8 changed the title [Help]: <title> Change docker container user chown maintenance issue Nov 1, 2021
@JaneX8 JaneX8 changed the title Change docker container user chown maintenance issue [Help]: Change docker container user chown maintenance issue Nov 1, 2021
@louislam
Copy link
Owner

louislam commented Nov 1, 2021

You can change PUID and PGID to 1000

Details:
#436

Unfortunately, some users was experiencing some permission problems when it is not root user. I cannot find the reason, so use at your own risk.

If you want to use USER, you need to build your own image.

@github-actions
Copy link

We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.

@github-actions github-actions bot added the Stale label Sep 24, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 2 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants