· Mar 30, 2022

IRIS Docker Image Timezone

I am working on a setup using the iris docker image (iris:2020.4.0.547.0).  I need the timezone to be a different timezone than the host.  Is there a way to do that by passing in an options / variable? 

Product version: IRIS 2020.1
Discussion (2)1
Log in or sign up to continue

I like to bake the timezone into the container when I build it.  That way it'll have the correct timezone no matter where I run it.  Here's an example Dockerfile based on the latest IRIS container that sets the container's timezone to Pacific (aka America/Los_Angeles).

FROM intersystemsdc/iris-community
USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
    apt-get install -yq tzdata && \
    ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime && \
    dpkg-reconfigure -f noninteractive tzdata
USER irisowner

You can then do a docker build . to create the container, docker image ls, and docker run