-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Dockerfile #105
base: master
Are you sure you want to change the base?
Adds Dockerfile #105
Conversation
I forgot that inside the container it was always thinking the timezone was UTC, so I added the TIMEZONE build argument to set it how you like.
|
COPY --from=0 /src/tty-clock /usr/bin/tty-clock | ||
CMD ['/usr/bin/tty-clock'] | ||
RUN apk add -U ncurses-libs tzdata && \ | ||
cp -rf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why isn't this just a TZ environment that can be passed by the docker run
caller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, that works too, you can set the default for the container with the build argument, as well as override it at runtime with the environment TZ
. I could remove the default, but I think its nice to be able to set it and not have to specify it again.
This adds a
Dockerfile
and amake docker
target to build tty-clock in an alpine container image.With the Dockerfile colocated with the source code in git, you can build the image all with one command: