Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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* optional' -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
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/
CMD ["/usr/sbin/sshd", "-D"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment