Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.

Creacion de directorio y scrpit para ejecutar 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 0
}
55 changes: 55 additions & 0 deletions alumnos/sharop/data-docker/Version.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2.7.8 (default, Oct 20 2014, 15:05:19) \n",
"[GCC 4.9.1]\n"
]
}
],
"source": [
"import sys\n",
"print (sys.version)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.8"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
24 changes: 24 additions & 0 deletions alumnos/sharop/runc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
#by Sharop
#TODO: Falta agregar condiciones y un poco de inteligencia para que verifique la maquina
space=docker ps -a | grep -i docker-ds | grep Up | cut -d' ' -f 1

case "$1" in
run)
docker run -d -p 8787:8787 -p 8888:8888 -v $(pwd)/data-docker:/home/itam/proyectos nanounanue/docker-ds
;;
stop)
docker stop $(echo $(docker ps -a | grep -i docker-ds | grep Up | cut -d' ' -f 1 ))
;;
kill)
docker rm $(echo $(docker ps -a | grep -i docker-ds | cut -d' ' -f 1 ))
;;
start)
docker start $(echo $(docker ps -a | grep -i docker-ds | cut -d' ' -f 1 ))
;;
*)
echo $"Uso $0 {run|stop|kill|start}"
exit 1

esac