this post was submitted on 04 Feb 2025
24 points (92.9% liked)

Selfhosted

60482 readers
508 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

I previously posted about an issue where the nginx container for the Collabora application logs a GET to /robots.txt every 10 seconds. I tried modifying the files in the container, but they were reset on restart. I also tried to run the container with --log-driver=none, but was unsuccessful. Despite being a software dev, I'm new to the homelab world and trunas.

I solved it by changing the docker image and then committing those changes. The change I made was to set access_log off; in the nginx config. I did it at the server root because I don't really care about those logs for this app, but it could be done on the location level.

Here's how I did it: Here's the reference SO post that I used: https://stackoverflow.com/a/74515438

What I did was I shelled into the image:

  • sudo docker exec -it ix-collabora-nginx-1 bash
  • apt update && apt install vim
  • vi /etc/nginx/nginx.conf and add the access_log off;
    • if you're not familiar with vim, arrow key to the line you want then press 'a' to enter "append mode". Make your change, then esc, :wq!. You need the ! because the file is read only
  • apt remove vim
  • exit
  • sudo docker commit <image id>
  • sudo docker restart ix-collabora-nginx-1
you are viewing a single comment's thread
view the rest of the comments
[–] RagingHungryPanda@lemm.ee 2 points 1 year ago* (last edited 1 year ago) (1 children)

So an issue i had was that I'd try to mount folders to this image but they wouldn't show up, but when I tried mounting it to a different image, it did. I'm not sure what I did wrong here, but I worked at it for a while and I'm still new to TruNas. But at least with this image, I don't mind too much about updates and it's an easy change that I can do again. Thanks for the feedback though, I'll be keeping this in mind and try to do things in a more "correct" manner 🙂

[–] Oisteink@feddit.nl 2 points 1 year ago

This is not a truenas issue - its a docker thing. You’d do better by making your own docker-file and do your customisation the docker way.