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

Set user.timezone; Remove unsupported option UsePAM and PrintLastLog #11

Merged
merged 3 commits into from
Apr 12, 2016
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
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