Install phantomjs in Docker container (#5368)

This commit is contained in:
Jesse Newland 2017-01-17 00:55:42 -06:00 committed by Paulus Schoutsen
parent 65bf30643a
commit 41a6c35ea2
3 changed files with 19 additions and 1 deletions

View file

@ -7,7 +7,7 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Copy build scripts
COPY script/setup_docker_prereqs script/build_python_openzwave script/build_libcec script/
COPY script/setup_docker_prereqs script/build_python_openzwave script/build_libcec script/install_phantomjs script/
RUN script/setup_docker_prereqs
# Install hass component dependencies

15
script/install_phantomjs Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
# Sets up phantomjs to be used with Home Assistant.
# Stop on errors
set -e
PHANTOMJS_VERSION="2.1.1"
cd "$(dirname "$0")/.."
mkdir -p build && cd build
curl -LSO https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
tar -xjf phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
mv phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
/usr/bin/phantomjs -v

View file

@ -50,6 +50,9 @@ cp -R /usr/src/app/build/python-openzwave/openzwave/config /usr/local/share/pyth
# Build and install libcec
script/build_libcec
# Install phantomjs
script/install_phantomjs
# Remove packages
apt-get remove -y --purge ${PACKAGES_DEV[@]}
apt-get -y --purge autoremove