skip to Main Content

What additional permissions do I need in dockerfile in order to see the logs of the container, I can see the openshift pod is accessible but logs are not rolling
Logs:

output of oc logs -f podname is as below

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh /docker-entrypoint.sh: Configuration complete; ready for start up

I am using nginx debian image

Permissions in dockerfile to the new user:
/var/cache/nginx,/var/log/nginx,/etc/nginx,/etc/nginx/conf.d,/etc/nginx/nginx.conf,/var/log/nginx,/var/www/html,/var/run/nginx.pid

2

Answers


  1. Just use

    docker logs <container-name>
    

    to look at the logs

    Login or Signup to reply.
  2. Your logs need to be on STDOUT and STDERR for you to see the logs. Here is an answer that will help you do that with NGINX. You will have to create a custom image by adding one RUN command. But I think this should get you what you need:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search