Commit b1ee8a01 authored by Fred Chasen's avatar Fred Chasen

Added dockerfile, updated xvfb dependencies

parent 35c8a4d4
Pipeline #821 failed with stage
node_modules
npm-debug.log
FROM node:latest
ENV DEPLOY_TO=/usr/src/vivliostyle-electron
RUN apt-get update && apt-get install -y \
libgtk2.0-dev libxtst-dev libxss1 libgconf2-dev libnss3-dev libasound2-dev \
xvfb
# Create app directory
RUN mkdir -p $DEPLOY_TO
WORKDIR $DEPLOY_TO
# Install app dependencies
RUN npm install -g gulp mocha
COPY package.json $DEPLOY_TO/
RUN npm install
COPY . $DEPLOY_TO
RUN npm link
CMD ["/bin/bash","script/test"]
......@@ -49,7 +49,7 @@ vivliostyle-electron ./path/to/index.html --hyphenate en-us --output
Install Xvfb
```
sudo apt-get install xvfb
sudo apt-get install libgtk2.0-dev libxtst-dev libxss1 libgconf2-dev libnss3-dev libasound2-dev xvfb
```
Run Xvfb
......@@ -65,7 +65,7 @@ Link and build the JS
```
npm install
npm link
npm -g gulp
npm install -g gulp
gulp watch
```
......@@ -95,3 +95,8 @@ Run the tests from the library root with the `mocha` command
```
mocha
```
## Docker
```bash
docker run -it -P -v $(pwd):/usr/src/vivliostyle-electron fchasen/vivliostyle-electron bash
```
#!/bin/bash
set -e
export DISPLAY=':99.0'
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
#!/bin/bash
set -e
export DISPLAY=':99.0'
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
npm test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment