A dockerfile for Tidbyt Pixlet
This allows you to develop pixlet apps in any host OS, then render and serve those apps within this container.
docker build --no-cache -t pixlet .
docker run --rm -it -p 8080:8080 pixlet
By default pixlet serves on 127.0.0.1, to expose this to the host container we must change the host IP to 0.0.0.0.
pixlet serve examples/sunrise.star -i 0.0.0.0
Navigate to localhost:8080 on your host machine.
If you are developing a tidbyt pixlet app in a local folder, you can run this container and serve it automatically to port 8080, automatically refreshing with local changes:
docker run --rm -it -p 8080:8080 -v C:\src\pixlet-docker\examples:/srv pixlet ./pixlet serve -i 0.0.0.0 -w /srv/sports_scores.star
docker run --rm -it -p 8080:8080 -v /usr/src/pixlet-docker/examples:/srv pixlet ./pixlet serve -i 0.0.0.0 -w /srv/sports_scores.star