Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
build: build/push GitHub image to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Jan 16, 2021
1 parent 3dfdded commit a2f9f54
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 6 deletions.
38 changes: 37 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,43 @@ jobs:
- run: >
sudo apt -qy update;
sudo apt -qy install libavahi-compat-libdnssd-dev libjpeg-turbo-progs optipng gifsicle
if: ${{ matrix.os == 'ubuntu-latest' }}
if: matrix.os == 'ubuntu-latest'
- run: npm install -g grunt-cli bower
- run: npm install # this also includes "grunt dist"
- run: npm test
docker:
needs: build
if: github.ref == 'refs/heads/master' || contains('refs/tags/v', github.ref)
runs-on: ubuntu-latest
name: Build Docker images
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- name: compute Docker tag name
id: tagname
run: |
case ${GITHUB_REF} in
refs/tags/v*)
echo ::set-output name=tag::${GITHUB_REF#refs/tags/v}
;;
refs/heads/master)
echo ::set-output name=tag::latest
;;
*)
echo ::set-output name=tag::${GITHUB_SHA}
;;
esac
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
platforms: linux/amd64 # ,linux/arm64: not working due to optipng vendoring
push: true
tags: |
ghcr.io/vincentbernat/dashkiosk:${{ steps.tagname.outputs.tag }}
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,22 @@ in the `gh-pages` branch of this repository. To update it:

# Docker

There is a `Dockerfile` to run *Dashkiosk* inside Docker. As of [06438d6](https://github.com/dersimn/dashkiosk/commit/06438d6613107de5f6069266a51098ece3c62e45) this will also work with Chromecast devices if your Docker host supports the `--net=host` option:
There is a `Dockerfile` to run *Dashkiosk* inside Docker. This will
also work with Chromecast devices if your Docker host supports the
`--net=host` option:

$ docker run --net=host \
-v /var/lib/dashkiosk/database:/database \
-e "chromecast__enabled=1" \
-e "chromecast__receiver=http://<DOCKER_HOST_IP>:8081/receiver" \
-e "port=8081" \
vincentbernat/dashkiosk:latest
ghcr.io/vincentbernat/dashkiosk:latest

To start without Chromecast support, simply run:

$ docker run -d -p 8080:8080 \
-v /var/lib/dashkiosk/database:/database \
vincentbernat/dashkiosk:latest
ghcr.io/vincentbernat/dashkiosk:latest

Using `latest` can be broken from time to time. You may prefer a
stable tag, like `2.6.1`.
stable tag, like `2.7.9`.
17 changes: 16 additions & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,22 @@ which URL to display.
Server and receiver
-------------------

To install it, you need to execute the following step:
The simpler way to get *Dashkiosk* is to use the Docker image::

$ docker run -d -p 8080:8080 \
-v /var/lib/dashkiosk/database:/database \
ghcr.io/vincentbernat/dashkiosk:latest

If you need Chromecast support, you need to use ``--net=host``::

$ docker run --net=host \
-v /var/lib/dashkiosk/database:/database \
-e "chromecast__enabled=1" \
-e "chromecast__receiver=http://<DOCKER_HOST_IP>:8081/receiver" \
-e "port=8081" \
ghcr.io/vincentbernat/dashkiosk:latest

Alternatively, you need to execute the following step:

1. Grab the latest `tarball for Dashkiosk`_ from GitHub.

Expand Down

0 comments on commit a2f9f54

Please sign in to comment.