Created
May 11, 2019 11:28
-
-
Save vangheem/4e9c30b75af79e288f4ac72f1db60c38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
RUN apt-get update && apt-get -y upgrade && apt-get install -y openssh-server vim \ | |
build-essential htop locales cron rsync libssl-dev libffi-dev tmux git gcc libreadline-dev \ | |
curl httpie wget clang-3.9 lldb-3.9 cmake sudo iputils-ping apt-transport-https \ | |
libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev libsqlite3-dev | |
RUN locale-gen en_US.UTF-8 | |
RUN mkdir /var/run/sshd | |
RUN groupadd developers && useradd --shell /bin/bash --create-home --home-dir /home/developers -g developers developers | |
RUN echo 'developers:#ChangeMe753' | chpasswd | |
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
# SSH login fix. Otherwise user is kicked off after login | |
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd | |
RUN usermod -aG sudo developers | |
ENV NOTVISIBLE "in users profile" | |
RUN echo "export VISIBLE=now" >> /etc/profile | |
WORKDIR /home/developers | |
RUN git clone https://github.com/facebook/rocksdb.git | |
WORKDIR /home/developers/rocksdb | |
RUN mkdir build | |
WORKDIR /home/developers/rocksdb/build | |
RUN cmake .. | |
RUN make all | |
RUN echo 'export CPLUS_INCLUDE_PATH=/home/developers/rocksdb/include/' >> /home/developers/.bashrc | |
RUN echo 'export LD_LIBRARY_PATH=/home/developers/rocksdb/build/' >> /home/developers/.bashrc | |
RUN echo 'export LIBRARY_PATH=/home/developers/rocksdb/build/' >> /home/developers/.bashrc | |
RUN chown developers:developers /home/developers/.bashrc | |
WORKDIR /home/developers/ | |
EXPOSE 22 | |
CMD ["/usr/sbin/sshd", "-D"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment