├── Dockerfile ├── LICENSE ├── README.md ├── entrypoint.sh └── xvfb.sh /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | MAINTAINER Nicola Molinari 4 | 5 | RUN apt-get update; \ 6 | apt-get install -y git curl; \ 7 | curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -; \ 8 | curl https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - ; \ 9 | sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'; \ 10 | apt-get update && apt-get install -y google-chrome-stable nodejs Xvfb; \ 11 | apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 12 | 13 | ADD xvfb.sh /etc/init.d/xvfb 14 | ADD entrypoint.sh /entrypoint.sh 15 | 16 | ENV DISPLAY :99.0 17 | ENV CHROME_BIN /usr/bin/google-chrome 18 | 19 | ENTRYPOINT ["/entrypoint.sh"] 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Nicola Molinari 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

This repository is deprecated and not maintained anymore

2 | 3 | A [Docker](https://www.docker.com/) container with 4 | 5 | - node 0.12 6 | - chrome for karma headless testing 7 | 8 | 9 | ```bash 10 | # run it 11 | 12 | $ docker run -it --rm -v $(pwd):/src -w /src -e NODE_ENV=CI emmenko/nodejs-karma npm -v 13 | Starting virtual X frame buffer: Xvfb. 14 | Executing command npm -v 15 | 2.11.3 16 | ``` 17 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | /etc/init.d/xvfb start && sleep 2 4 | 5 | echo "Executing command $@" 6 | exec "$@" 7 | -------------------------------------------------------------------------------- /xvfb.sh: -------------------------------------------------------------------------------- 1 | XVFB=/usr/bin/Xvfb 2 | XVFBARGS=":99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset" 3 | PIDFILE=/var/run/xvfb.pid 4 | case "$1" in 5 | start) 6 | echo -n "Starting virtual X frame buffer: Xvfb" 7 | start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS 8 | echo "." 9 | ;; 10 | stop) 11 | echo -n "Stopping virtual X frame buffer: Xvfb" 12 | start-stop-daemon --stop --quiet --pidfile $PIDFILE 13 | echo "." 14 | ;; 15 | restart) 16 | $0 stop 17 | $0 start 18 | ;; 19 | *) 20 | echo "Usage: /etc/init.d/xvfb {start|stop|restart}" 21 | exit 1 22 | esac 23 | 24 | exit 0 25 | --------------------------------------------------------------------------------