This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/develop by this push:
     new 453ea2b  Adding SSHD containers to support as local storage resource
453ea2b is described below

commit 453ea2b40c560ff2f7255e0c78d875b0bc6b8a25
Author: Dimuthu Wannipurage <[email protected]>
AuthorDate: Mon Mar 11 12:53:44 2019 -0400

    Adding SSHD containers to support as local storage resource
---
 .../src/main/resources/gateway-storage/Dockerfile  | 22 ++++++++++++++++++++++
 .../src/main/resources/pga/docker-compose.yml      | 12 ++++++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git 
a/modules/ide-integration/src/main/resources/gateway-storage/Dockerfile 
b/modules/ide-integration/src/main/resources/gateway-storage/Dockerfile
new file mode 100644
index 0000000..4e1ddb2
--- /dev/null
+++ b/modules/ide-integration/src/main/resources/gateway-storage/Dockerfile
@@ -0,0 +1,22 @@
+FROM ubuntu:16.04
+
+RUN apt-get update && apt-get install -y openssh-server
+RUN mkdir /var/run/sshd
+RUN echo 'root:root' | 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
+
+ENV NOTVISIBLE "in users profile"
+RUN echo "export VISIBLE=now" >> /etc/profile
+
+RUN mkdir -p /var/www/portals/gateway-user-data
+RUN mkdir /root/.ssh
+ADD authorized_keys /root/.ssh/authorized_keys
+
+RUN chmod 700 /root/.ssh
+RUN chmod 644 /root/.ssh/authorized_keys
+
+EXPOSE 22
+CMD ["/usr/sbin/sshd", "-D"]
\ No newline at end of file
diff --git a/modules/ide-integration/src/main/resources/pga/docker-compose.yml 
b/modules/ide-integration/src/main/resources/pga/docker-compose.yml
index cf8e4aa..cad944e 100644
--- a/modules/ide-integration/src/main/resources/pga/docker-compose.yml
+++ b/modules/ide-integration/src/main/resources/pga/docker-compose.yml
@@ -1,4 +1,4 @@
-version: '3'
+version: '2.1'
 services:
   pga:
     image: dimuthuupe/pga:1.0
@@ -6,4 +6,12 @@ services:
       - ./airavata-php-gateway:/var/www/portals/default
       - ./exp-data-dir:/var/www/portals/gateway-user-data
     ports:
-      - "8008:80"
\ No newline at end of file
+      - "8008:80"
+    mem_limit: 3G
+    mem_reservation: 3G
+  sshd:
+    image: dimuthuupe/sshd:1.0
+    volumes:
+      - ./exp-data-dir:/var/www/portals/gateway-user-data
+    ports:
+      - "22222:22"

Reply via email to