Skip to content

Instantly share code, notes, and snippets.

@aamsur-mkt
Created August 28, 2020 15:35
Show Gist options
  • Save aamsur-mkt/1ce2635d9796351677ee220d4f6788e6 to your computer and use it in GitHub Desktop.
Save aamsur-mkt/1ce2635d9796351677ee220d4f6788e6 to your computer and use it in GitHub Desktop.
Set Debian and Alpine Docker Timezone
## DEBIAN DOCKERFILE
ENV TZ=Asia/Jakarta
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
## ALPINE DOCKERFILE
RUN apk add --no-cache tzdata
ENV TZ Asia/Jakarta
## DEBIAN RUNNING CONTAINER
export TZ=Asia/Jakarta && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
## ALPINE RUNNING CONTAINER
apk add --no-cache tzdata && export TZ=Asia/Jakarta && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment