<commit_before># Dockerfile with systemd/sshd for CentOS 7
#

FROM stackio/centos7-systemd

MAINTAINER <NAME> <<EMAIL>>

RUN echo "===> Installing SSH..."        && \
    yum -y install openssh-server epel-release && \
    yum -y install pwgen && \

    echo "===> Configuring ssh..."    && \
    rm -f /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_rsa_key && \
    ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_ecdsa_key && \
    ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key && \
    sed -i "s/#UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config

# configure sshd
ADD set_root_pw.sh /set_root_pw.sh
ADD run.sh /run.sh
RUN chmod +x /*.sh
ENV AUTHORIZED_KEYS **None**

RUN systemctl enable sshd.service

EXPOSE 22

CMD ["/run.sh"]
<commit_msg>Add sudo without TTY<commit_after># Dockerfile with systemd/sshd for CentOS 7
#

FROM stackio/centos7-systemd

MAINTAINER <NAME> <<EMAIL>>

RUN echo "===> Installing SSH..."        && \
    yum -y install openssh-server epel-release && \
    yum -y install pwgen && \

    echo "===> Configuring ssh..."    && \
    rm -f /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_rsa_key && \
    ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_ecdsa_key && \
    ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key && \
    sed -i "s/#UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config && \

    echo "===> Install sudo and don't require TTY..."
    yum -y install sudo && \
    sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/'  /etc/sudoers

# configure sshd
ADD set_root_pw.sh /set_root_pw.sh
ADD run.sh /run.sh
RUN chmod +x /*.sh
ENV AUTHORIZED_KEYS **None**

RUN systemctl enable sshd.service

EXPOSE 22

CMD ["/run.sh"]

{'fraction_non_alphanumeric': 0.15911730545876887, 'fraction_numerical': 0.005226480836236934, 'mean_word_length': 2.7133620689655173, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1271028', 'n_tokens_mistral': 746, 'n_tokens_neox': 690, 'n_words': 168}