Skip to content
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

Add tzdata to allow specifying TZ env variable #14

Merged
merged 4 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ All user visible changes to this project will be documented in this file. This p



## [alpine3.16-r4] · 2022-10-28
[alpine3.16-r4]: /../../tree/alpine3.16-r4

[Diff](/../../compare/alpine3.16-r3...alpine3.16-r4)

### Added

- Support of `TZ` environment variable. ([#14])

[#14]: /../../pull/14




## [alpine3.16-r3] · 2022-08-10
[alpine3.16-r3]: /../../tree/alpine3.16-r3

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# https://hub.docker.com/_/alpine
ARG alpine_ver=3.16
FROM alpine:${alpine_ver}.2
FROM alpine:${alpine_ver}

ARG build_rev=3
ARG build_rev=4


# Install Rsync and SSH.
Expand All @@ -12,6 +12,6 @@ RUN apk update \
rsync \
openssh-client-default \
sshpass \
ca-certificates \
ca-certificates tzdata \
&& update-ca-certificates \
&& rm -rf /var/cache/apk/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Rsync + SSH Docker image

## Supported tags and respective `Dockerfile` links

- [`alpine3.16-r3`, `alpine3.16`, `alpine`, `latest`][d1]
- [`alpine3.16-r4`, `alpine3.16`, `alpine`, `latest`][d1]



Expand Down
10 changes: 10 additions & 0 deletions tests/main.bats
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@
'rsync --help'
[ "$status" -eq 0 ]
}


@test "TZ env var works ok" {
run docker run --rm --pull never --platform $PLATFORM \
-e TZ=America/Chicago \
--entrypoint sh $IMAGE -c \
'date +%Z'
[ "$status" -eq 0 ]
[ "$output" = "CDT" ]
}