Giter VIP home page Giter VIP logo

Comments (9)

0atman avatar 0atman commented on July 20, 2024

Do I need some kind of go standard library?

from dockerize.

0atman avatar 0atman commented on July 20, 2024

Could this be causing trouble?

/var/log/nginx# ls -al
total 8
drwxr-xr-x 2 root root 4096 Oct 28 22:01 .
drwxr-xr-x 9 root root 4096 Nov 10 15:06 ..
lrwxrwxrwx 1 root root   11 Oct 28 22:01 access.log -> /dev/stdout
lrwxrwxrwx 1 root root   11 Oct 28 22:01 error.log -> /dev/stderr

from dockerize.

0atman avatar 0atman commented on July 20, 2024

If I leave off -stdout /var/log/nginx/access.log -stderr /var/log/nginx/error.log it runs (though I'm not sure yet if it works)

from dockerize.

0atman avatar 0atman commented on July 20, 2024

Oh! the offical docker nginx repo makes these links:

https://github.com/nginxinc/docker-nginx/blob/4e5332fa50a1f8f73657417c6bfe249bbb3b110d/Dockerfile#L15

RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log

Is that what's causing the failure?

from dockerize.

0atman avatar 0atman commented on July 20, 2024

Can confirm that replacing the links with regular files fixes the stacktrace, when using -stdout /var/log/nginx/access.log -stderr /var/log/nginx/error.log

from dockerize.

0atman avatar 0atman commented on July 20, 2024

Proposed fix:

Defensively code the part that redirects log files to stdout/error.

from dockerize.

0atman avatar 0atman commented on July 20, 2024

I'd do it, but I'm no go pro!

from dockerize.

sstarcher avatar sstarcher commented on July 20, 2024

Could this be related to overlayfs?
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/882147
moby/moby#11705

from dockerize.

 avatar commented on July 20, 2024
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log

It's have same effect like dockerize's -stdout /var/log/nginx/access.log -stderr /var/log/nginx/error.log, but the ln -sf way is better, because dockerzie don't cleans already forwarded lines from logs and container continues growing.

from dockerize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.