Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with timezone and docker:stable #17

Open
earendilfr opened this issue Jun 16, 2023 · 0 comments
Open

Issue with timezone and docker:stable #17

earendilfr opened this issue Jun 16, 2023 · 0 comments

Comments

@earendilfr
Copy link

Environment:

  • OS name: docker:stable
  • Architecture: amd64
  • ntopng version/revision: 5.6.230531 rev.20531

What happened:

I try to start the docker with the localtime correctly configured.
But, anytime, he use the UTC and not my localtime file indicated in the compose file

  ntopng:
    container_name: ntopng
    image: 'docker.io/ntop/ntopng:stable'
    restart: always
    depends_on:
      - clickhouse
      - redis
      - nprobe
      - influxdb
    volumes:
      - "/usr/share/zoneinfo:/usr/share/zoneinfo:ro"
      - "/etc/localtime:/etc/localtime:ro"
      - "/opt/ntopng/ntopng.license:/etc/ntopng.license:ro"
      - "/opt/ntopng/ntopng/config:/etc/ntopng:rw"
      - "/opt/ntopng/ntopng/data:/var/lib/ntopng:rw"
    environment:
      - NTOP_CONFIG="/etc/ntopng/ntopng.conf"
      - TZ="Europe/Zurich"
    network_mode: "host"
    command:
      - "/etc/ntopng/ntopng.conf"

How did you reproduce it?

Modify the compose file and restart the compose with command docker compose up -d

Debug Information:

With this configuration, I have that on the shell:

dadmrossetam:ntopng/ $ sudo docker exec -ti ntopng /bin/sh
# ls -al /etc/localtime
lrwxrwxrwx 1 root root 23 May 31 15:35 /etc/localtime -> /usr/share/zoneinfo/UTC
#

I think the issue is related to the following part that is present in stable Dockerfile:

FROM ubuntu:22.04
MAINTAINER ntop.org

ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && \
    apt-get -y -q install wget lsb-release gnupg libelf1 && \

So, even if I try to override it, it can not work...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant