Created
August 28, 2020 15:35
-
-
Save aamsur-mkt/1ce2635d9796351677ee220d4f6788e6 to your computer and use it in GitHub Desktop.
Set Debian and Alpine Docker Timezone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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