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
  • @ikidd
    link
    English
    13 hours ago

    deleted by creator