Skip to content

Commit

Permalink
simplified docker hosting steps
Browse files Browse the repository at this point in the history
since with the new docker experimental buildx builder I am now able
to build images for multiple platforms effortlessly I will now build
and upload production-ready images.
Building images yourself is no longer necessary :)

In the future, when this docker feature gets stable, we will be able
to automate that with Docker-Hub or TravisCI.
  • Loading branch information
keydon committed Aug 20, 2019
1 parent 0e856ab commit f9500d1
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ kodi-hosts.config*.js
**/bower_components
**/node_modules
**/launch.json
*.sh
.git/
.gitignore
example/
examples/
.eslintrc.json
.glitch-assets
.travis.yml
README.md
35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,19 +253,10 @@ You can configure your instance simply through *environment variables* or a `kod
- For all other systems please see the offical documentation
[Docker Installation](https://docs.docker.com/engine/installation/)
2. Get the latest *GoogleHomeKodi* docker image
First try it this way:
```
docker build --tag omertu/googlehomekodi https://github.com/OmerTu/GoogleHomeKodi.git
```
If that fails with a `git` not found error (i.e. on LibreELEC systems), use this alternative method:
```
curl -L -O https://github.com/OmerTu/GoogleHomeKodi/archive/master.tar.gz
tar xzf master.tar.gz
cd GoogleHomeKodi-master
docker build --tag omertu/googlehomekodi .
docker pull omertu/googlehomekodi
```
3. Run the docker image
3. Now just run the production-ready docker image
- with the use of environment variables:
```sh
docker run \
Expand All @@ -281,6 +272,28 @@ You can configure your instance simply through *environment variables* or a `kod
--name googlehomekodi \
omertu/googlehomekodi
```
- with the use of docker-compose:
create a file named `docker-compose.yml` with the following contents:
```
version: '3'
services:
googlehomekodi:
image: omertu/googlehomekodi
ports:
- "8099:8099"
environment:
- KODI_PROTOCOL=http
- KODI_IP=YOUR_INTERNAL_KODI_IP_ADDRESS
- KODI_PORT=YOUR_KODI_PORT
- KODI_USER=YOUR_KODI_USER_NAME
- KODI_PASSWORD=YOUR_KODI_PASSWORD
- AUTH_TOKEN=YOUR_CONNECTION_PASSWORD
restart: always
```
and then just fire it up with
```sh
docker-compose up --detach
```
- or with the use of the config file:
- Create a copy of the `kodi-hosts.config.js.dist` file and name it `kodi-hosts.config.js`.
- Edit the file and make sure the kodiConfig and globalConfig sections match your environment.
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'
services:
googlehomekodi:
image: omertu/googlehomekodi
ports:
- "8099:8099"
environment:
- KODI_PROTOCOL=http
- KODI_IP=YOUR_INTERNAL_KODI_IP_ADDRESS
- KODI_PORT=YOUR_KODI_PORT
- KODI_USER=YOUR_KODI_USER_NAME
- KODI_PASSWORD=YOUR_KODI_PASSWORD
- AUTH_TOKEN=YOUR_CONNECTION_PASSWORD
restart: always
6 changes: 6 additions & 0 deletions docker_build_and_push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

docker buildx build \
--platform linux/amd64,linux/arm64,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 \
--tag omertu/googlehomekodi:latest \
--push .

0 comments on commit f9500d1

Please sign in to comment.