@@ -593,109 +593,105 @@ RUN cd ${NORMAL_USER_HOME}/firefox-src \
593593 ;done \
594594 && chown -R ${NORMAL_USER}:${NORMAL_GROUP} ${SEL_HOME}
595595
596- ENV FIREFOX_VERSIONS "${FIREFOX_VERSIONS1}, ${FIREFOX_VERSIONS2}, ${FIREFOX_VERSIONS3}"
597-
598- # ===================================
599- # Firefox version to use during run
600- # ===================================
601- # For firefox please pick one of $FIREFOX_VERSIONS, default latest
602- ENV FIREFOX_VERSION ${FIREFOX_LATEST_VERSION}
603-
604596# =================
605597# Supervisor conf
606598# =================
607599ADD supervisor/etc/supervisor/supervisord.conf /etc/supervisor/
608600ADD **/etc/supervisor/conf.d/* /etc/supervisor/conf.d/
609601
610- # ==================
611- # User & ssh stuff
612- # ==================
602+ # ======
603+ # User
604+ # ======
613605USER ${NORMAL_USER}
614- ENV USER ${NORMAL_USER}
615- ENV HOME ${NORMAL_USER_HOME}
616- ENV VNC_STORE_PWD_FILE ${HOME}/.vnc/passwd
617-
618- # ========================================================================
619- # Some configuration options that can be customized at container runtime
620- # ========================================================================
621- ENV BIN_UTILS /bin-utils
622- ENV PATH ${PATH}:${BIN_UTILS}
623- # JVM uses only 1/4 of system memory by default
624- ENV MEM_JAVA_PERCENT 80
625- # Max amount of time to wait for other processes dependencies
626- ENV WAIT_TIMEOUT 5s
627- ENV SCREEN_WIDTH 1900
628- ENV SCREEN_HEIGHT 1480
629- ENV SCREEN_MAIN_DEPTH 24
630- ENV SCREEN_DEPTH ${SCREEN_MAIN_DEPTH}+32
631- ENV DISP_N 10
632- ENV DISPLAY :${DISP_N}
633- ENV XEPHYR_DISPLAY :${DISP_N}
634- ENV SCREEN_NUM 0
635- # ENV XEPHYR_SCREEN_SIZE "${SCREEN_WIDTH}""x""${SCREEN_HEIGHT}"""
636- # Even though you can change them below, don't worry too much about container
637- # internal ports since you can map them to the host via `docker run -p`
638- ENV SELENIUM_PORT 24444
639- ENV SELENIUM_HUB_PORT ${SELENIUM_PORT}
640- # You may want to connect to another hub
641- ENV SELENIUM_HUB_HOST 127.0.0.1
642- ENV SELENIUM_NODE_HOST 127.0.0.1
643- ENV SELENIUM_NODE_CH_PORT 25550
644- ENV SELENIUM_NODE_FF_PORT 25551
645- # Selenium additional params:
646- ENV SELENIUM_HUB_PARAMS ""
647- ENV SELENIUM_NODE_PARAMS ""
648- # Selenium capabilities descriptive (to avoid opera/ie warnings)
649- # docs at https://code.google.com/p/selenium/wiki/Grid2
650- ENV MAX_INSTANCES 1
651- ENV MAX_SESSIONS 1
652- ENV SEL_RELEASE_TIMEOUT_SECS 9000
653- ENV SEL_BROWSER_TIMEOUT_SECS 6000
654- ENV SEL_CLEANUPCYCLE_MS 70000
655- ENV SEL_NODEPOLLING_MS 60000
656- # Vnc
657- ENV VNC_PORT 25900
658- ENV NOVNC_PORT 26080
659- # You can set the VNC password or leave null so a random password is generated:
660- # ENV VNC_PASSWORD topsecret
661- ENV SSHD_PORT 22222
662- # Supervisor (process management) http server
663- ENV SUPERVISOR_HTTP_PORT 29001
664- ENV SUPERVISOR_HTTP_USERNAME supervisorweb
665- ENV SUPERVISOR_HTTP_PASSWORD somehttpbasicauthpwd
666- ENV SUPERVISOR_REQUIRED_SRV_LIST "vnc|novnc|sshd|selenium-hub|selenium-node-chrome|selenium-node-firefox|xmanager|xterm|xvfb"
667- # Supervisor loglevel and also general docker log level
668- # can be: debug, warn, trace, info
669- ENV LOG_LEVEL info
670- ENV LOGFILE_MAXBYTES 10MB
671- ENV LOGFILE_BACKUPS 5
672- # Logs are now managed by supervisord.conf, see
673- # ${LOGS_DIR}/*.log
674- ENV LOGS_DIR /var/log/sele
675- # ENV VIDEO_FORMAT xxxx
676- # Encoding movie type "flv", "swf5", "swf7", "mpeg" (PyMedia required)
677- # or "vnc" more info at http://www.unixuser.org/~euske/vnc2swf/pyvnc2swf.html
678- ENV VNC2SWF_ENCODING swf5
679- # Specifies the framerate in fps. (default=12.0). Reducing the frame rate
680- # sometimes helps reducing the movie size.
681- ENV VNC2SWF_FRAMERATE 25
682- # ffmpeg encoding options
683- ENV FFMPEG_FRAME_RATE 25
684- # ENV FFMPEG_CODEC_ARGS "-vcodec libx264 -vpre lossless_ultrafast -threads 0"
685- ENV FFMPEG_CODEC_ARGS ""
686- # Video recording on container create
687- ENV VIDEO false
688- # Video file and extension, e.g. swf, mp4
689- ENV VIDEO_FILE_EXTENSION "mkv"
690- ENV VIDEO_FILE_NAME "test"
691- ENV VIDEOS_DIR "${NORMAL_USER_HOME}/videos"
692- ENV VIDEO_LOG_FILE "${LOGS_DIR}/video-rec-stdout.log"
693- ENV VIDEO_PIDFILE "${RUN_DIR}/video.pid"
694- # ===============================
695- # Run docker from inside docker
696- # Usage: docker run -v /var/run/docker.sock:/var/run/docker.sock
697- # -v $(which docker):$(which docker)
698- ENV DOCKER_SOCK "/var/run/docker.sock"
606+
607+ # ======
608+ # Envs
609+ # ======
610+ ENV FIREFOX_VERSIONS="${FIREFOX_VERSIONS1}, ${FIREFOX_VERSIONS2}, ${FIREFOX_VERSIONS3}" \
611+ # Firefox version to use during run
612+ # For firefox please pick one of $FIREFOX_VERSIONS, default latest
613+ FIREFOX_VERSION=${FIREFOX_LATEST_VERSION} \
614+ # User and home
615+ USER="${NORMAL_USER}" \
616+ HOME="${NORMAL_USER_HOME}" \
617+ # Vnc password file
618+ VNC_STORE_PWD_FILE="${NORMAL_USER_HOME}/.vnc/passwd" \
619+ BIN_UTILS="/bin-utils" \
620+ # JVM uses only 1/4 of system memory by default
621+ MEM_JAVA_PERCENT=80 \
622+ # Max amount of time to wait for other processes dependencies
623+ WAIT_TIMEOUT="5s" \
624+ SCREEN_WIDTH=1900 \
625+ SCREEN_HEIGHT=1480 \
626+ SCREEN_MAIN_DEPTH=24 \
627+ SCREEN_SUB_DEPTH=32 \
628+ # Display number; see entry.sh for $DISPLAY
629+ DISP_N=10 \
630+ SCREEN_NUM=0 \
631+ # ENV XEPHYR_SCREEN_SIZE "${SCREEN_WIDTH}""x""${SCREEN_HEIGHT}"""
632+ # Even though you can change them below, don't worry too much about container
633+ # internal ports since you can map them to the host via `docker run -p`
634+ SELENIUM_HUB_PORT=24444 \
635+ # You may want to connect to another hub
636+ SELENIUM_HUB_HOST="127.0.0.1" \
637+ SELENIUM_NODE_HOST="127.0.0.1" \
638+ SELENIUM_NODE_CH_PORT=25550 \
639+ SELENIUM_NODE_FF_PORT=25551 \
640+ # Selenium additional params:
641+ SELENIUM_HUB_PARAMS="" \
642+ SELENIUM_NODE_PARAMS="" \
643+ # Selenium capabilities descriptive (to avoid opera/ie warnings)
644+ # docs at https://code.google.com/p/selenium/wiki/Grid2
645+ MAX_INSTANCES=1 \
646+ MAX_SESSIONS=1 \
647+ SEL_RELEASE_TIMEOUT_SECS=9000 \
648+ SEL_BROWSER_TIMEOUT_SECS=6000 \
649+ SEL_CLEANUPCYCLE_MS=70000 \
650+ SEL_NODEPOLLING_MS=60000 \
651+ # Vnc
652+ VNC_PORT=25900 \
653+ NOVNC_PORT=26080 \
654+ # You can set the VNC password or leave null so a random password is generated:
655+ # ENV VNC_PASSWORD topsecret
656+ SSHD_PORT=22222 \
657+ # Supervisor (process management) http server
658+ SUPERVISOR_HTTP_PORT=29001 \
659+ SUPERVISOR_HTTP_USERNAME=supervisorweb \
660+ SUPERVISOR_HTTP_PASSWORD=somehttpbasicauthpwd \
661+ SUPERVISOR_REQUIRED_SRV_LIST="vnc|novnc|sshd|xmanager|xvfb" \
662+ # Supervisor loglevel and also general docker log level
663+ # can be: debug, warn, trace, info
664+ LOG_LEVEL=info \
665+ LOGFILE_MAXBYTES=10MB \
666+ LOGFILE_BACKUPS=5 \
667+ # Logs are now managed by supervisord.conf, see
668+ # ${LOGS_DIR}/*.log
669+ LOGS_DIR="/var/log/sele" \
670+ # ENV VIDEO_FORMAT xxxx
671+ # Encoding movie type "flv", "swf5", "swf7", "mpeg" (PyMedia required)
672+ # or "vnc" more info at http://www.unixuser.org/~euske/vnc2swf/pyvnc2swf.html
673+ VNC2SWF_ENCODING=swf5 \
674+ # Specifies the framerate in fps. (default=12.0). Reducing the frame rate
675+ # sometimes helps reducing the movie size.
676+ VNC2SWF_FRAMERATE=25 \
677+ # ffmpeg encoding options
678+ FFMPEG_FRAME_RATE=25 \
679+ # ENV FFMPEG_CODEC_ARGS "-vcodec libx264 -vpre lossless_ultrafast -threads 0"
680+ FFMPEG_CODEC_ARGS="" \
681+ # Services to start by default; true/false
682+ VIDEO=false \
683+ GRID=true \
684+ CHROME=true \
685+ FIREFOX=true \
686+ # Video file and extension, e.g. swf, mp4, mkv, flv
687+ VIDEO_FILE_EXTENSION="mkv" \
688+ VIDEO_FILE_NAME="test" \
689+ VIDEOS_DIR="${NORMAL_USER_HOME}/videos" \
690+ # ===============================
691+ # Run docker from inside docker
692+ # Usage: docker run -v /var/run/docker.sock:/var/run/docker.sock
693+ # -v $(which docker):$(which docker)
694+ DOCKER_SOCK="/var/run/docker.sock"
699695
700696# ================================
701697# Expose Container's Directories
@@ -704,7 +700,7 @@ ENV DOCKER_SOCK "/var/run/docker.sock"
704700
705701# Only expose ssh port given the other services are not secured
706702# forcing the user to open ssh tunnels or use docker run -p ports...
707- # EXPOSE ${SELENIUM_PORT } ${VNC_PORT} ${SSHD_PORT} ${TOMCAT_PORT}
703+ # EXPOSE ${SELENIUM_HUB_PORT } ${VNC_PORT} ${SSHD_PORT} ${TOMCAT_PORT}
708704EXPOSE ${SSHD_PORT}
709705
710706# ================
@@ -737,7 +733,8 @@ RUN mkdir -p ${NORMAL_USER_HOME}/.vnc \
737733 && sudo chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix \
738734 # To avoid error "Missing privilege separation directory: /var/run/sshd"
739735 && sudo mkdir -p /var/run/sshd \
740- && sudo chmod 744 /var/run/sshd
736+ && sudo chmod 744 /var/run/sshd \
737+ && echo ""
741738
742739# =====================================================
743740# Meta JSON file to hold commit info of current build
@@ -753,5 +750,5 @@ RUN [ $(find ./ -mtime -1 -type f -name "scm-source.json" 2>/dev/null) ] \
753750# CMD or ENTRYPOINT
754751# ===================
755752# ENTRYPOINT ["entry.sh"]
756- CMD ["entry.sh" ]
757753# CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
754+ CMD ["/bin-utils/entry.sh" ]
0 commit comments