Skip to content

Instantly share code, notes, and snippets.

@gh640
Created August 7, 2022 09:01
Show Gist options
  • Select an option

  • Save gh640/5fc3dde29881cb46ec78cc608f956ec7 to your computer and use it in GitHub Desktop.

Select an option

Save gh640/5fc3dde29881cb46ec78cc608f956ec7 to your computer and use it in GitHub Desktop.
サンプル: Docker の `ubuntu:20.04` イメージでタイムゾーンを JST に変更する
FROM ubuntu:20.04
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata
@gh640
Copy link
Copy Markdown
Author

gh640 commented Aug 7, 2022

ubuntu:22.04 の場合も同じです。

FROM ubuntu:22.04

RUN apt-get update && \
 DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \
 rm -rf /var/lib/apt/lists/* /var/cache/apt/*

RUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
  dpkg-reconfigure --frontend noninteractive tzdata

@gh640
Copy link
Copy Markdown
Author

gh640 commented Aug 7, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment