Sign inSign up

alvin2439/mysql-tz

By alvin2439

•Updated almost 6 years ago

mysql with timezone fix

Image
0

76

alvin2439/mysql-tz repository overview

⁠What is mysql-tz

This is a mysql image with timezone fix

The docker file is as follows:

FROM mysql:5.7
RUN echo "USE mysql;" > /docker-entrypoint-initdb.d/timezones.sql &&  mysql_tzinfo_to_sql /usr/share/zoneinfo >> /docker-entrypoint-initdb.d/timezones.sql

An example of docker-compose usage is as follows:

version: '3.4'

services:
  db:
    image: alvin2439/mysql-tz:5.7
    container_name: db
    restart: unless-stopped
    ports:
      - 3306:3306
    environment:
        TZ: "America/New_York"
        MYSQL_DATABASE: example_db
        MYSQL_ROOT_PASSWORD: ChangeMeNow!!!
    healthcheck:
        test: ["CMD", "mysqladmin", "ping", "--silent", "-pChangeMeNow!!!"]
        interval: 5s
        timeout: 10s
        retries: 3  
    volumes:
        - ../data/db/mysql/:/var/lib/mysql

Tag summary

Content type

Image

Digest

Size

118.9 MB

Last updated

almost 6 years ago

docker pull alvin2439/mysql-tz:5.7