Skip to content

Commit

Permalink
Set user.timezone; Remove unsupported option UsePAM and PrintLastLog (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
elifarley committed Apr 12, 2016
1 parent ac6ea8b commit fdf4825
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions alpine-jdk-8-sshd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ FROM frolvlad/alpine-oraclejdk8:cleaned
MAINTAINER Elifarley Cruz <[email protected]>

ENV TZ ${TZ:-Brazil/East}
ENV JAVA_TOOL_OPTIONS="-Duser.timezone=$TZ"

RUN echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk --update add --no-cache tzdata curl openssh rsync shadow bash git && \
echo "TZ set to '$TZ'" && cp -a /usr/share/zoneinfo/"$TZ" /etc/localtime && apk del tzdata && \
apk --update add --no-cache tzdata ttf-dejavu curl openssh rsync shadow bash git && \
echo "TZ set to '$TZ'" && echo $TZ > /etc/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 && \
printf "\nPort 2200\nUsePrivilegeSeparation no\nPermitRootLogin no\nUsePAM no\nPasswordAuthentication no\nChallengeResponseAuthentication no\nPrintMotd no\nPrintLastLog no\n#---\n" > /etc/ssh/sshd_config && cat /etc/ssh/sshd_config.tmp >> /etc/ssh/sshd_config && rm /etc/ssh/sshd_config.tmp && \
printf "\nPort 2200\nUsePrivilegeSeparation no\nPermitRootLogin no\nPasswordAuthentication no\nChallengeResponseAuthentication no\nPrintMotd no\n#---\n" > /etc/ssh/sshd_config && cat /etc/ssh/sshd_config.tmp >> /etc/ssh/sshd_config && rm /etc/ssh/sshd_config.tmp && \
cp -a /etc/ssh /etc/ssh.cache

ENV TINI_SHA 066ad710107dc7ee05d3aa6e4974f01dc98f3888
Expand Down
5 changes: 3 additions & 2 deletions alpine-openjdk-8-sshd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ FROM java:openjdk-8-jdk-alpine
MAINTAINER Elifarley Cruz <[email protected]>

ENV TZ ${TZ:-Brazil/East}
ENV JAVA_TOOL_OPTIONS="-Duser.timezone=$TZ"

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 && \
echo "TZ set to '$TZ'" && cp -a /usr/share/zoneinfo/"$TZ" /etc/localtime && apk del tzdata && \
echo "TZ set to '$TZ'" && echo $TZ > /etc/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 && \
printf "\nPort 2200\nUsePrivilegeSeparation no\nPermitRootLogin no\nUsePAM no\nPasswordAuthentication no\nChallengeResponseAuthentication no\nPrintMotd no\nPrintLastLog no\n#---\n" > /etc/ssh/sshd_config && cat /etc/ssh/sshd_config.tmp >> /etc/ssh/sshd_config && rm /etc/ssh/sshd_config.tmp && \
printf "\nPort 2200\nUsePrivilegeSeparation no\nPermitRootLogin no\nPasswordAuthentication no\nChallengeResponseAuthentication no\nPrintMotd no\n#---\n" > /etc/ssh/sshd_config && cat /etc/ssh/sshd_config.tmp >> /etc/ssh/sshd_config && rm /etc/ssh/sshd_config.tmp && \
cp -a /etc/ssh /etc/ssh.cache

ENV TINI_SHA 066ad710107dc7ee05d3aa6e4974f01dc98f3888
Expand Down
3 changes: 2 additions & 1 deletion openjdk-8-sshd-devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ ENV GEM_HOME "$HOME/gem-home"
ENV PATH "$GEM_HOME/bin:$PATH"

ENV TZ ${TZ:-Brazil/East}
RUN rm -f /etc/localtime && ln -s /usr/share/zoneinfo/"$TZ" /etc/localtime
ENV JAVA_TOOL_OPTIONS="-Duser.timezone=$TZ"
RUN echo "TZ set to '$TZ'" && echo $TZ > /etc/TZ && rm -f /etc/localtime && ln -s /usr/share/zoneinfo/"$TZ" /etc/localtime

EXPOSE 2200
#VOLUME $HOME/.rbenv
Expand Down

0 comments on commit fdf4825

Please sign in to comment.