aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 90cd4b3fb8854c895c1d72738d8f12bc77c2ae0c (plain)
  1. ## initial build:
  2. # docker build -t local/voctomix .
  3. ## re-build:
  4. # docker tag local/voctomix:latest local/voctomix:old; docker build -t local/voctomix . && docker rmi local/voctomix:old
  5. #
  6. ## run:
  7. # docker run -it --rm local/voctocore help
  8. #
  9. ## core:
  10. # docker run -it --rm -v /some/dir:/video
  11. # -p 9999:9999 -p 10000:10000 -p 10001:10001 -p 10002:10002 -p 11000:11000 -p 12000:12000 \
  12. # -p 13000:13000 -p 13001:13001 -p 13002:13002 -p 14000:14000 -p 15000:15000 -p 16000:16000 \
  13. # -p 17000:17000 -p 17001:17001 -p 17002:17002 -p 18000:18000 --name=voctocore local/voctomix core
  14. #
  15. ## test sources
  16. # docker run -it --rm --name=cam1 --link=voctocore:corehost local/voctomix gstreamer/source-videotestsrc-as-cam1.sh
  17. # docker run -it --rm --name=bg --link=voctocore:corehost local/voctomix gstreamer/source-videotestsrc-as-background-loop.sh#
  18. #
  19. ## gui
  20. ## gui will connect to "corehost": corehost is aliased to container "voctocore"
  21. # xhost +local:$(id -un)
  22. # docker run -it --rm --name=gui --env=gid=$(id -g) --env=uid=$(id -u) --env=DISPLAY=:0 --link=voctocore:corehost \
  23. # -v /tmp/vocto/configgui.ini:/opt/voctomix/voctogui/config.ini -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth local/voctomix gui
  24. FROM ubuntu:wily
  25. MAINTAINER Bjoern Riemer <bjoern.riemer@web.de>
  26. ENV DEBIAN_FRONTEND noninteractive
  27. ENV uid 1000
  28. ENV gid 1000
  29. RUN useradd -m voc
  30. RUN apt-get update \
  31. && apt-get install -y gstreamer1.0-plugins-good vim-tiny wget \
  32. && apt-get install -y --no-install-recommends gstreamer1.0-tools libgstreamer1.0-0 python3 python3-gi gir1.2-gstreamer-1.0 gstreamer1.0-plugins-bad \
  33. && apt-get install -y gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-gtk-3.0 gstreamer1.0-x ffmpeg python3-gi-cairo \
  34. && apt-get clean
  35. RUN wget -q https://github.com/tianon/gosu/releases/download/1.7/gosu-amd64 -O /bin/gosu && chmod +x /bin/gosu
  36. RUN mkdir -p /opt/voctomix
  37. EXPOSE 9998 9999 10000 10001 10002 11000 12000 13000 13001 13002 14000 15000 16000 17000 17001 17002 18000
  38. VOLUME /video
  39. WORKDIR /opt/voctomix
  40. COPY . /opt/voctomix/
  41. COPY docker-ep.sh /opt/voctomix/
  42. RUN sed -i 's/localhost/corehost/g' voctogui/default-config.ini ;\
  43. sed -i 's/system=gl/system=xv/g' voctogui/default-config.ini ;\
  44. find /opt/voctomix/example-scripts/ -type f -exec sed -i 's/localhost/corehost/g' {} \;
  45. ENTRYPOINT ["/opt/voctomix/docker-ep.sh"]
  46. CMD ["help"]