Git Product home page Git Product logo

docker-wct's Introduction

Build Status

docker-wct

A Docker image for running web-component-tester tests against Google Polymer elements and applications in Firefox and Chrome with no GUI.

Pull

docker pull clapclapexcitement/wct

Example usage

git clone https://github.com/PolymerElements/iron-ajax.git

docker run -it \
  -v $(pwd)/iron-ajax:/usr/src/app \
  --security-opt seccomp:unconfined \
  clapclapexcitement/wct bash \
  -c "bower install && xvfb-run wct --skip-selenium-install"

Can you give me that as a one liner?

docker run -it -v $(pwd)/iron-ajax:/usr/src/app --security-opt seccomp:unconfined clapclapexcitement/wct bash -c "bower install && xvfb-run wct --skip-selenium-install"

Building from the Dockerfile

Building requires that you've installed and are running Docker.

git clone https://github.com/mdb/docker-wct.git
cd docker-wct
docker build -t your-image-name .

Notes on seccomp

seccomp-bpf extends seccomp and allows the filtering of system calls using a configurable policy. It is used by Google Chrome/Chromium web browsers on Chrome OS and Linux.

This requires the use of a suitable profile or seccomp:unconfined.

More can be read here.

Bonus: render the container's Linux GUI on your Mac

The clapclapexcitement/wct image has no GUI but your Mac does!

To render the clapclapexcitement/wct output to your Mac's Xquartz X Window system...

Install socat, the network utility:

brew install socat

Start socat to expose a local Qquartz socket on a TCP port:

socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

Pass the display to the container (assuming the VirtualBox host is available on 192.168.59.3):

docker run -it \
  -e DISPLAY=192.168.59.3:0 \
  -v $(pwd)/iron-ajax:/usr/src/app \
  --security-opt seccomp:unconfined \
  clapclapexcitement/wct bash \
  -c "bower install && wct --skip-selenium-install"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.