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

add openssh to the docker #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 6 additions & 2 deletions django_project/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY wait-for-it.sh /
COPY start.sh /
COPY install-database.sh /code/
COPY REQUIREMENTS.txt /code/
RUN apt-get update && apt-get install -y --no-install-recommends postgresql-client \
RUN apt-get update && apt-get install -y --no-install-recommends openssh-server postgresql-client \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir --upgrade setuptools \
Expand All @@ -23,7 +23,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends postgresql-clie
&& chmod +x /start.sh \
&& chmod +x /code/install-database.sh \
&& ln -s /usr/lib/x86_64-linux-gnu/libgeos_c.so.1 /usr/lib \
&& ln -s /usr/lib/x86_64-linux-gnu/libgeos_c.so /usr/lib
&& ln -s /usr/lib/x86_64-linux-gnu/libgeos_c.so /usr/lib \
&& echo "root:Docker!" | chpasswd
COPY . /code/

COPY sshd_config /etc/ssh/

EXPOSE 8000 2222
CMD ["/start.sh"]
Empty file added django_project/src/sshd_config
Empty file.
2 changes: 2 additions & 0 deletions django_project/src/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
echo "Start SSH Server"
/etc/init.d/ssh start
echo "Wait for database"
/wait-for-it.sh "$PGHOST":"$PGPORT"
echo "Start Waterboard website"
Expand Down