[ZBX-12027] Docker compose cannot start Ubuntu images which are relying on individual localization. Created: 2017 Apr 08  Updated: 2020 Aug 26  Resolved: 2020 Aug 26

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Installation (I)
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Marc Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: docker, docker-compose, localization, volumes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In opposite to the Alpine images does the file /etc/timezone already exist and hence the bind mount from the Docker host fails.

[root@docker zabbix-docker]# docker-compose -f docker-compose_v2_ubuntu_pgsql_latest.yaml up -d
Creating zabbixdocker_db_data_pgsql_1
Creating zabbixdocker_zabbix-java-gateway_1
Creating zabbixdocker_db_data_mysql_1
Creating zabbixdocker_zabbix-snmptraps_1
Creating zabbixdocker_mysql-server_1
Creating zabbixdocker_postgres-server_1
Creating zabbixdocker_zabbix-server_1

ERROR: for zabbix-server  Cannot start service zabbix-server: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\\"/etc/timezone\\\" to rootfs \\\"/var/lib/docker/overlay/2e0c2367d1d2cc04c0f70f63ba72f5885de2ebad051309ca23fd47840a44b84a/merged\\\" at \\\"/var/lib/docker/overlay/2e0c2367d1d2cc04c0f70f63ba72f5885de2ebad051309ca23fd47840a44b84a/merged/etc/timezone\\\" caused \\\"not a directory\\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
[root@docker zabbix-docker]#

Removing the file from the Ubuntu images does the trick to me:

--- SNIP --- Dockerfile --- SNAP ---

RUN rm -f /etc/timezone

--- SNAP --- Dockerfile --- SNIP ---

Generated at Fri Apr 26 12:29:37 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.