Docker Timezone in Ubuntu 16.04 Image

前端 未结 10 1771
借酒劲吻你
借酒劲吻你 2020-12-13 10:40

I have created a Docker container using the Ubuntu 16.04 image.

docker run -it -d --name containername -v /var/www/public --privileged ubuntu
10条回答
  •  青春惊慌失措
    2020-12-13 11:05

    Try:

    echo "Asia/Kolkata" > /etc/timezone
    rm -f /etc/localtime
    dpkg-reconfigure -f noninteractive tzdata
    

    You have to do rm /etc/localtime because of the Ubuntu bug.

提交回复
热议问题