Skip to content

Commit

Permalink
Add a Dockerfile to build dockerhub images
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanphix committed Apr 28, 2017
1 parent 8797601 commit 24ef8ff
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
- docker

before_install:
- docker build -f tests/Dockerfile -t test .
- docker build -f docker/DockerfileTest -t test .

script:
- docker run --env TRAVIS=true test python3 tests/run.py
17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,22 @@ Installation

ghost.py requires PySide2_ Qt5_ bindings.

The most convenient way to run ghost is to use the official docker image.

.. code:: bash
docker run -i -t jeanphix/ghost.py:2.0.0-dev python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ghost import Ghost
>>> g = Ghost()
>>> with g.start() as session:
... session.open('http://jeanphix.me')
...
(<ghost.ghost.HttpResource object at 0x7f3a118fa128>, [<ghost.ghost.HttpResource object at 0x7f3a118fa128>, <ghost.ghost.HttpResource object at 0x7f3a118fa0f0>, <ghost.ghost.HttpResource object at 0x7f3a118fa160>, <ghost.ghost.HttpResource object at 0x7f3a118ec4e0>, <ghost.ghost.HttpResource object at 0x7f3a118ecfd0>])
.. _PySide2: https://wiki.qt.io/PySide2
.. _Qt5: https://www.qt.io/developers/
12 changes: 12 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ubuntu:xenial
ENV PYTHONUNBUFFERED 1
RUN apt-get update
RUN apt-get install python3-pip xvfb git software-properties-common -y
RUN apt-get install software-properties-common -y &&\
add-apt-repository ppa:thopiekar/pyside-git -y &&\
apt-get remove software-properties-common -y
RUN apt-get update
RUN apt-get install python3-pyside2 -y
RUN apt-get clean
RUN pip3 install xvfbwrapper
RUN pip3 install ghost.py --pre
File renamed without changes.

0 comments on commit 24ef8ff

Please sign in to comment.