Skip to content

Alpine ruby image fails Ruby TZ tests due to lack of tzdata #502

Open
@NathanZook

Description

@NathanZook
sudo docker run --env TZ=America/Los_Angeles -it ruby:slim /usr/local/bin/ruby -e 'puts Time.utc(2007, 11, 4, 9, 0, 0).localtime'

2007-11-04 01:00:00 -0800

sudo docker run --env TZ=America/Los_Angeles -it ruby:alpine /usr/local/bin/ruby -e 'puts Time.utc(2007, 11, 4, 9, 0, 0).localtime'

2007-11-04 09:00:00 +0000

Some searching led to this:
#218

Pointing to this:
https://serverfault.com/questions/683605/docker-container-time-timezone-will-not-reflect-changes/683651#683651

Pointing to this:
gliderlabs/docker-alpine#136

Which looks a LOT like this is a known issue/WONTFIX, but I must protest. This fails the ruby TZ tests.

I understand that as a minimalist distribution, Alpine, tzdata is not required, but it is required for properly-functioning ruby. If the maintainers believe that it is correct to leave tzdata out of the ruby:alpine image, then surely it is friendly to document the absence of the package, probably via a comment next to one of the apk add statements. (I would prefer it in the build set, as it is needed for the tests to pass.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions