linuxserver / docker-nginx

GNU General Public License v3.0
145 stars 44 forks source link

Can not run after last update #78

Closed firebull81 closed 3 years ago

firebull81 commented 3 years ago

Expected Behavior

Normaly run the Docker container

Current Behavior

Container can't run at all.

Steps to Reproduce

  1. Get latest Docker image
  2. Update container to this image
  3. Run the container

Environment

OS: Raspbian GNU/Linux 10 (buster) CPU architecture: ARMv7 Processor rev 5 (v7l) How docker service was installed: From official Docker repo. Using Docker Compose

Command used to create docker container (run/create/compose/screenshot)

version: "2.1" testing: image: ghcr.io/linuxserver/nginx container_name: testing environment:

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 01-envfile: executing... [cont-init.d] 01-envfile: exited 0. [cont-init.d] 10-adduser: executing... usermod: no changes


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support LSIO projects visit: https://www.linuxserver.io/donate/

GID/UID

User uid: 1000 User gid: 1000

chown: changing ownership of '/config': Operation not permitted [cont-init.d] 10-adduser: exited 0. [cont-init.d] 20-config: executing... chown: changing ownership of '/config/nginx/site-confs/default': Operation not permitted chown: changing ownership of '/config/nginx/site-confs': Operation not permitted chown: changing ownership of '/config/nginx/nginx.conf': Operation not permitted chown: changing ownership of '/config/nginx': Operation not permitted chown: changing ownership of '/config/www/index.html': Operation not permitted chown: changing ownership of '/config/www': Operation not permitted chown: changing ownership of '/config/log/nginx': Operation not permitted chown: changing ownership of '/config/log/php': Operation not permitted chown: changing ownership of '/config/log': Operation not permitted chown: changing ownership of '/config/keys/cert.key': Operation not permitted chown: changing ownership of '/config/keys/cert.crt': Operation not permitted chown: changing ownership of '/config/keys': Operation not permitted chown: changing ownership of '/config/php/php-local.ini': Operation not permitted chown: changing ownership of '/config/php/www2.conf': Operation not permitted chown: changing ownership of '/config/php': Operation not permitted chown: changing ownership of '/config/geoip2db': Operation not permitted chown: changing ownership of '/config/custom-cont-init.d': Operation not permitted chown: changing ownership of '/config/custom-services.d': Operation not permitted chown: changing ownership of '/config': Operation not permitted [cont-init.d] 20-config: exited 0. [cont-init.d] 30-keygen: executing... using keys found in /config/keys [cont-init.d] 30-keygen: exited 0. [cont-init.d] 40-config: executing... Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please manually download/update the GeoIP2 db and save as /config/geoip2db/GeoLite2-City.mmdb [cont-init.d] 40-config: exited 0. [cont-init.d] 90-custom-folders: executing... chown: changing ownership of '/config/custom-cont-init.d': Operation not permitted chown: changing ownership of '/config/custom-services.d': Operation not permitted [cont-init.d] 90-custom-folders: exited 1. [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.

firebull81 commented 3 years ago

BTW, the last working image is "ghcr.io/linuxserver/nginx:1.18.0-r15-ls134"

firebull81 commented 3 years ago

This is the log, using those (ghcr.io/linuxserver/nginx:1.18.0-r15-ls134) image

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 01-envfile: executing... [cont-init.d] 01-envfile: exited 0. [cont-init.d] 10-adduser: executing...

  _         ()
 | |  ___   _    __
 | | / __| | |  /  \
 | | \__ \ | | | () |
 |_| |___/ |_|  \__/

Brought to you by linuxserver.io To support LSIO projects visit: https://www.linuxserver.io/donate/ GID/UID User uid: 1000 User gid: 1000 chown: changing ownership of '/config': Operation not permitted [cont-init.d] 10-adduser: exited 0. [cont-init.d] 20-config: executing... chown: changing ownership of '/config/nginx/site-confs/default': Operation not permitted chown: changing ownership of '/config/nginx/site-confs': Operation not permitted chown: changing ownership of '/config/nginx/nginx.conf': Operation not permitted chown: changing ownership of '/config/nginx': Operation not permitted chown: changing ownership of '/config/www/index.html': Operation not permitted chown: changing ownership of '/config/www': Operation not permitted chown: changing ownership of '/config/log/nginx': Operation not permitted chown: changing ownership of '/config/log/php': Operation not permitted chown: changing ownership of '/config/log': Operation not permitted chown: changing ownership of '/config/keys/cert.key': Operation not permitted chown: changing ownership of '/config/keys/cert.crt': Operation not permitted chown: changing ownership of '/config/keys': Operation not permitted chown: changing ownership of '/config/php/php-local.ini': Operation not permitted chown: changing ownership of '/config/php/www2.conf': Operation not permitted chown: changing ownership of '/config/php': Operation not permitted chown: changing ownership of '/config/geoip2db': Operation not permitted chown: changing ownership of '/config/custom-cont-init.d': Operation not permitted chown: changing ownership of '/config/custom-services.d': Operation not permitted chown: changing ownership of '/config': Operation not permitted [cont-init.d] 20-config: exited 0. [cont-init.d] 30-keygen: executing... using keys found in /config/keys [cont-init.d] 30-keygen: exited 0. [cont-init.d] 40-config: executing... Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please manually download/update the GeoIP2 db and save as /config/geoip2db/GeoLite2-City.mmdb [cont-init.d] 40-config: exited 0. [cont-init.d] 99-custom-files: executing... [custom-init] no custom files found exiting... [cont-init.d] 99-custom-files: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done.

github-actions[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

Roxedus commented 3 years ago

Is /mnt/testing a remote filesystem?

firebull81 commented 3 years ago

Yes is it.

Roxedus commented 3 years ago

The container needs to be able to have files owned by root, for security reasons.

firebull81 commented 3 years ago

The container needs to be able to have files owned by root, for security reasons.

Ok, but here is different case... There is nothing about the security reasons.

Thank you.

Roxedus commented 3 years ago

There is nothing about the security reasons.

What?

firebull81 commented 3 years ago

??? @Roxedus as you may see in my third comment - there is the log about the container with old tag. There is also such "warnings", and the container just run like a charm. Also, I'm using default (recomended) UID and GID for the container, and everything works just perfect, till now. As I've mentioned in the description above - after my last image docker update, the container misteriously stop working. There is nothing special in the log, wich may lead me to the problem. That's why I'm seeking about some help with this. If you think that this is permisions problem - please advise me some proper config setup, over this environment.

Thank you.

Roxedus commented 3 years ago
  1. The IDs are not recommended, they are examples, you are supposed to fit them to your environment.
  2. To tighten security for custom- init and services, we chown these folders to root.
  3. Remote shares have never been something we offer support for, as its troublesome with most containers. We need to chown some folders, some remote filesystems may need tweaking to support this.
  4. Your last comment made no sense for me, I wanted you do elaborate, which you now have.
firebull81 commented 3 years ago

After some adjustments with UID and GID, everything became smooth.

Thank you.