Advertisement
RobertBerger

Untitled

Oct 17th, 2017
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. export SRC_PATH="/home/rber/projects/opengrok"
  2. export DATA_PATH="/home/rber/projects/opengrok"
  3. export PUBLIC_PORT="8822"
  4. export CONTAINER="dieterplex/docker-opengrok"
  5.  
  6. # remove currently running containers
  7. echo "+ ID_TO_KILL=\$(docker ps -a -q --filter ancestor=${CONTAINER})"
  8. ID_TO_KILL=$(docker ps -a -q --filter ancestor=${CONTAINER})
  9.  
  10. echo "+ docker ps -a"
  11. docker ps -a
  12. echo "+ docker stop ${ID_TO_KILL}"
  13. docker stop ${ID_TO_KILL}
  14. echo "+ docker rm -f ${ID_TO_KILL}"
  15. docker rm -f ${ID_TO_KILL}
  16. echo "+ docker ps -a"
  17. docker ps -a
  18.  
  19. set -x
  20. docker run --privileged -d -v ${SRC_PATH}:/opengrok/src -v ${DATA_PATH}:/opengrok/data -p ${PUBLIC_PORT}:8080 ${CONTAINER}
  21. set +x
  22. echo "in the webbrowser:"
  23. echo "http://localhost:${PUBLIC_PORT}/source/"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement