Skip to content

Commit

Permalink
Set timezone via TZ env var (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
elifarley committed Apr 12, 2016
1 parent 5a11a1b commit ac6ea8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions alpine-jdk-8-sshd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM frolvlad/alpine-oraclejdk8:cleaned
MAINTAINER Elifarley Cruz <[email protected]>

ENV TIMEZONE Brazil/East
ENV TZ ${TZ:-Brazil/East}

RUN echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk --update add --no-cache tzdata curl openssh rsync shadow bash git && \
cp -a /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime && apk del tzdata && \
echo "TZ set to '$TZ'" && cp -a /usr/share/zoneinfo/"$TZ" /etc/localtime && apk del tzdata && \
rm -rf /var/cache/apk/*

RUN sed -e '/Port/d;/UsePrivilegeSeparation/d;/PermitRootLogin/d;/UsePAM/d;/PasswordAuthentication/d;/ChallengeResponseAuthentication/d;/Banner/d;/PrintMotd/d;/PrintLastLog/d' /etc/ssh/sshd_config > /etc/ssh/sshd_config.tmp && \
Expand Down
7 changes: 4 additions & 3 deletions alpine-openjdk-8-sshd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM java:openjdk-8-jdk-alpine
MAINTAINER Elifarley Cruz <[email protected]>

ENV TIMEZONE Brazil/East
ENV TZ ${TZ:-Brazil/East}

RUN echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk --update add --no-cache tzdata ttf-dejavu curl openssh rsync shadow bash git && \
cp -a /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime && apk del tzdata && \
echo "TZ set to '$TZ'" && cp -a /usr/share/zoneinfo/"$TZ" /etc/localtime && apk del tzdata && \
rm -rf /var/cache/apk/*

RUN sed -e '/Port/d;/UsePrivilegeSeparation/d;/PermitRootLogin/d;/UsePAM/d;/PasswordAuthentication/d;/ChallengeResponseAuthentication/d;/Banner/d;/PrintMotd/d;/PrintLastLog/d' /etc/ssh/sshd_config > /etc/ssh/sshd_config.tmp && \
Expand All @@ -24,7 +24,8 @@ RUN curl -fsSL https://github.com/krallin/tini/releases/download/v0.5.0/tini-sta

# Install Rocker: https://github.com/grammarly/rocker
ENV ROCKER_VERSION 1.1.2
RUN curl -fsSL https://github.com/grammarly/rocker/releases/download/"$ROCKER_VERSION"/rocker-"$ROCKER_VERSION"-linux_amd64.tar.gz | tar -xzC /bin && chmod +x /bin/rocker
RUN curl -fsSL https://github.com/grammarly/rocker/releases/download/"$ROCKER_VERSION"/rocker-"$ROCKER_VERSION"-linux_amd64.tar.gz | \
tar -xzC /usr/local/bin && chmod +x /usr/local/bin/rocker

# Install Maven
ENV MAVEN_VERSION 3.3.9
Expand Down
4 changes: 2 additions & 2 deletions openjdk-8-sshd-devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ ENV GEM_SPEC_CACHE "$HOME/gemspec"
ENV GEM_HOME "$HOME/gem-home"
ENV PATH "$GEM_HOME/bin:$PATH"

ENV TIMEZONE Brazil/East
RUN rm -f /etc/localtime && ln -s /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime
ENV TZ ${TZ:-Brazil/East}
RUN rm -f /etc/localtime && ln -s /usr/share/zoneinfo/"$TZ" /etc/localtime

EXPOSE 2200
#VOLUME $HOME/.rbenv
Expand Down

0 comments on commit ac6ea8b

Please sign in to comment.