-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
36 lines (25 loc) · 1013 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ubuntu:16.04
MAINTAINER danigosa <[email protected]>
RUN apt-get update && apt-get install -y -qq \
python-pip \
openssh-server
RUN pip install --upgrade pip
RUN pip install 'django-redis>=4.5.0'
RUN pip install hiredis mock msgpack-python fakeredis
RUN mkdir /django-redis-sentinel
COPY . /django-redis-sentinel
WORKDIR /django-redis-sentinel
VOLUME /django-redis-sentinel
COPY entrypoint.sh /
# Enable OpenSSH for remote interpreters like pydev or Pycharm
# Expose SSH for development purposes
RUN mkdir /var/run/sshd
RUN echo 'root:screencast' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/prohibit-password/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
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
EXPOSE 22
ENTRYPOINT ["/entrypoint.sh"]