Skip to content

Instantly share code, notes, and snippets.

@jknsware
Created July 31, 2019 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jknsware/383f5e9358b504d2dea26cebe3c9eb76 to your computer and use it in GitHub Desktop.
Save jknsware/383f5e9358b504d2dea26cebe3c9eb76 to your computer and use it in GitHub Desktop.

Thanks to this article on doing the heavy lifting.

In Ubuntu:

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

RUN  echo America/Chicago > /etc/timezone \
  && ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime \
  && dpkg-reconfigure -f noninteractive tzdata

In Alpine, I'll have to do more experimentation:

RUN apk --no-cache update && \
    apk --no-cache upgrade && \
apk --no-cache add tzdata openntpd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment