I have created a Docker container using the Ubuntu 16.04 image.
docker run -it -d --name containername -v /var/www/public --privileged ubuntu
I am also experiencing this issue for a Ubuntu 18.04 docker container. Since tzdata package is not installed. There is no /usr/share/zoneinfo dir inside the docker. We need to first install tzdata and use dpkg-reconfigure to set the timezone. The following docker command works for me:
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends tzdata \
&& rm -rf /var/lib/apt/lists/*
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& dpkg-reconfigure --frontend noninteractive tzdata