Skip to content

Commit

Permalink
Add tzdata package to allow specifying TZ env var (#14)
Browse files Browse the repository at this point in the history
Co-authored-by: Kai Ren <[email protected]>
  • Loading branch information
afonsoc12 and tyranron authored Oct 28, 2022
1 parent 09ebefe commit ec7c706
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
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" ]
}

0 comments on commit ec7c706

Please sign in to comment.