cells
cells copied to clipboard
docker image does not recognise timezone appropriately
📝 Describe the bug Date on host reports according to timezone. Date on cells container reports in UTC. Date on database container reports according to timezone.
⚙️ How-to Reproduce
Steps to reproduce the behavior:
- Run pydio cells in container, passing "TZ" environment variable and "localtime" and "timezone" volumes
- Run the following commands:
$ docker exec pydio-cells date
Tue Apr 16 14:42:38 America 2024
$ docker exec pydio-cells cat /etc/timezone
America/Edmonton
$ docker exec pydio-db date
Tue Apr 16 08:42:56 MDT 2024
$ docker exec pydio-db cat /etc/timezone
America/Edmonton
🩺 Environment / Setup
Complete the following information:
Server Versions:
- Pydio Cells Home Edition 4.4.0
- MySQL 8.3.0-1.el8
- Server OS: Linux 6.1.0-18-amd64 x86_64
- Other dependencies Docker version 25.0.4, build 1a576c5
- Other dependencies Docker Compose version v2.24.7
Client used for testing:
- Docker compose
- Terminal window
Additional context:
- May need to pass
tzdatato the alpine base image to enable timezone support
Hi. Could you please precise what image you are using ?
It is not the official image from the Docker's hub: pydio/cells:latest, is it ?
Here's my compose.yaml file:
services:
pydio:
image: pydio/cells:latest
container_name: pydio-cells
hostname: files
domainname: example.com
ports:
- "8808:8080" # web ui
environment:
- TZ=America/Edmonton
- CELLS_INSTALL_YAML=/pydio/config/install-conf.yml
- CELLS_BIND=0.0.0.0:8080
- CELLS_SITE_BIND=0.0.0.0:8080
- CELLS_EXTERNAL=https://files.example.com
- CELLS_SITE_EXTERNAL=https://files.example.com
- CELLS_NO_TLS=1
- CELLS_LOG=info
- CELLS_LOG_LEVEL=production
- CELLS_DEFAULT_DS_STRUCT=true
volumes:
- /srv/pydio/config/install-conf.yml:/pydio/config/install-conf.yml:ro
- /srv/pydio/cells:/var/cells
- /media/storage/cells/:/var/cells/data
- /media:/media
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
pydio-db:
image: mysql:latest
container_name: pydio-db
hostname: pydio-db
domainname: example.com
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci]
ports:
- "3306:3306" # mysql
environment:
- TZ=America/Edmonton
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
volumes:
- /srv/pydio/mysql:/var/lib/mysql
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
Here's me trying to pull the latest image to confirm that it is up to date:
$ docker pull pydio/cells:latest
latest: Pulling from pydio/cells
Digest: sha256:5588c806d566ee1d83a1029015aff07fd9720363286127718f495317e1c50f80
Status: Image is up to date for pydio/cells:latest
docker.io/pydio/cells:latest
So yup, pydio/cells:latest is correct.