docker - run phantomjs 安装到ubuntu 24

访问量: 26

refer to: 

https://stackoverflow.com/questions/8778513/how-can-i-set-up-run-phantomjs-on-ubuntu/79465200#79465200

https://stackoverflow.com/a/79465200/445908

on ubuntu 24. phantomjs is not supported any more ( this project stopped on 2023) so you have to run docker

  1. create a file: /usr/bin/phantomjs
#!/bin/bash
docker run --rm wernight/phantomjs phantomjs "$@"

chmod +x /usr/bin/phantomjs

  1. install docker and pull this docker image:
docker pull wernight/phantomjs

that's it. usage:

/usr/bin/phantomjs -v

> 2.1.1 

订阅/RSS Feed

Subscribe