mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-18 19:09:02 +02:00
Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aca230a7f4 | ||
|
|
1bfcab7820 | ||
|
|
cef8433132 | ||
|
|
1242eb382f | ||
|
|
9eb70621ea | ||
|
|
7ed3224f50 | ||
|
|
a706d63e78 | ||
|
|
23fea30955 | ||
|
|
1ca34b5f73 | ||
|
|
6c819aac1c | ||
|
|
57c3fe2371 | ||
|
|
641be7cebe | ||
|
|
f00aff57a1 | ||
|
|
a5b0ab5b7a | ||
|
|
f312524d71 | ||
|
|
60b4b10965 | ||
|
|
2effdf5fea | ||
|
|
543343359e | ||
|
|
98bd35cc52 | ||
|
|
bf5288071b | ||
|
|
118892975a | ||
|
|
833ec7515e | ||
|
|
87137450db | ||
|
|
1a92ab16dd | ||
|
|
898c58ce7e | ||
|
|
9fd6c97559 | ||
|
|
30cfacd55f | ||
|
|
634d5ffb63 | ||
|
|
e41bc8af6c | ||
|
|
57c697587f | ||
|
|
c2707f3795 | ||
|
|
727d79fa2f | ||
|
|
15e87e08a0 | ||
|
|
5401fdf86c | ||
|
|
f888101d01 | ||
|
|
e286d168e1 | ||
|
|
2e5f8c9e22 | ||
|
|
2b4509d468 | ||
|
|
b5235be806 | ||
|
|
d73948e8d4 | ||
|
|
1337535351 | ||
|
|
8843ee2f68 | ||
|
|
432364f63d | ||
|
|
139a3beedd | ||
|
|
da3a998e04 | ||
|
|
182c78d72c | ||
|
|
b6bb7ed5ea | ||
|
|
a9d4f38bdb | ||
|
|
06d6421c4b | ||
|
|
296ff3c612 | ||
|
|
6ccf196ae2 | ||
|
|
e20f66ada6 | ||
|
|
e72353b3fa | ||
|
|
c70f27151e | ||
|
|
465a412bc2 | ||
|
|
93bcf7c8f7 | ||
|
|
c22873c7bf | ||
|
|
814298a795 | ||
|
|
10624f62f8 | ||
|
|
d4a31e2629 | ||
|
|
ebb3e831e7 | ||
|
|
f3861e8fb5 | ||
|
|
e7b859f22d | ||
|
|
f4d40df862 | ||
|
|
95451d052f | ||
|
|
28402a09c4 | ||
|
|
859aaf1526 | ||
|
|
f131b96a19 | ||
|
|
a8f90cab49 | ||
|
|
da63f43852 | ||
|
|
868a129397 | ||
|
|
9dd5391499 | ||
|
|
a0460749c2 | ||
|
|
5d59a618a2 | ||
|
|
6bc5c28649 | ||
|
|
c4a34b4432 | ||
|
|
744a293100 | ||
|
|
398cd5c981 | ||
|
|
6ac2e67e26 | ||
|
|
08cb2d6094 | ||
|
|
c91330e77e | ||
|
|
4b33937d27 | ||
|
|
234248fdc2 | ||
|
|
0ac3ce2786 | ||
|
|
403a181033 | ||
|
|
ed7160f9fe | ||
|
|
27f3142205 | ||
|
|
e77597a915 | ||
|
|
31fef22c61 | ||
|
|
5211ef7275 | ||
|
|
860759fb74 | ||
|
|
09bc8c0a0f | ||
|
|
507459ebd1 | ||
|
|
4ab35c860c | ||
|
|
5e7fb6312e | ||
|
|
454a3b4922 | ||
|
|
32ee0cf992 | ||
|
|
8fd9307113 | ||
|
|
daa31f2e5f | ||
|
|
f4fd69aa34 | ||
|
|
239bc41506 |
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@@ -5,4 +5,4 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
target-branch: "dev"
|
target-branch: "main"
|
||||||
|
|||||||
1
.github/dependencies/.js-controller-version
vendored
Normal file
1
.github/dependencies/.js-controller-version
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
4.0.15
|
||||||
@@ -1,25 +1,23 @@
|
|||||||
# Github action to build Docker image from beta branch (tag: beta)
|
# Github action to build Docker image from beta branch (tag: beta)
|
||||||
name: Build debian based image (beta-node14)
|
name: Build debian beta-node16
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
release:
|
||||||
branches:
|
types: [prereleased]
|
||||||
- beta
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
schedule:
|
|
||||||
- cron: '42 3 * * 1'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bulid-beta-node14-image:
|
build-beta-node16-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo (beta)
|
- name: Getting published prerelease tag
|
||||||
uses: actions/checkout@v2.3.4
|
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2.4.0
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: 'beta'
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
|
|
||||||
- name: Get and write version and date
|
- name: Get and write version and date
|
||||||
id: version
|
id: version
|
||||||
@@ -37,8 +35,8 @@ jobs:
|
|||||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
||||||
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
||||||
# amd64
|
# amd64
|
||||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node14/Dockerfile > ./debian/node14/Dockerfile.tmp
|
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node16/Dockerfile > ./debian/node16/Dockerfile.tmp
|
||||||
mv -f ./debian/node14/Dockerfile.tmp ./debian/node14/Dockerfile
|
mv -f ./debian/node16/Dockerfile.tmp ./debian/node16/Dockerfile
|
||||||
|
|
||||||
- name: Set up manifest tool
|
- name: Set up manifest tool
|
||||||
run: |
|
run: |
|
||||||
@@ -50,67 +48,67 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1.5.1
|
uses: docker/setup-buildx-action@v1.6.0
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
username: ${{ secrets.PACKAGES_USER }}
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build Docker image (node14-amd64)
|
- name: Build Docker image (node16-amd64)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node14/Dockerfile
|
file: ./debian/node16/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: |
|
tags: |
|
||||||
buanet/iobroker:${{ env.version }}-node14-amd64,
|
buanet/iobroker:${{ env.version }}-node16-amd64,
|
||||||
ghcr.io/buanet/iobroker:${{ env.version }}-node14-amd64
|
ghcr.io/buanet/iobroker:${{ env.version }}-node16-amd64
|
||||||
|
|
||||||
- name: Build Docker image (node14-arm32v7)
|
- name: Build Docker image (node16-arm32v7)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node14/Dockerfile
|
file: ./debian/node16/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm/v7
|
platforms: linux/arm/v7
|
||||||
tags: |
|
tags: |
|
||||||
buanet/iobroker:${{ env.version }}-node14-arm32v7,
|
buanet/iobroker:${{ env.version }}-node16-arm32v7,
|
||||||
ghcr.io/buanet/iobroker:${{ env.version }}-node14-arm32v7
|
ghcr.io/buanet/iobroker:${{ env.version }}-node16-arm32v7
|
||||||
|
|
||||||
- name: Build Docker image (node14-arm64v8)
|
- name: Build Docker image (node16-arm64v8)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node14/Dockerfile
|
file: ./debian/node16/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64/v8
|
platforms: linux/arm64/v8
|
||||||
tags: |
|
tags: |
|
||||||
buanet/iobroker:${{ env.version }}-node14-arm64v8,
|
buanet/iobroker:${{ env.version }}-node16-arm64v8,
|
||||||
ghcr.io/buanet/iobroker:${{ env.version }}-node14-arm64v8
|
ghcr.io/buanet/iobroker:${{ env.version }}-node16-arm64v8
|
||||||
|
|
||||||
- name: Create and push manifests
|
- name: Create and push manifests
|
||||||
run: |
|
run: |
|
||||||
sed -e "s/\${VERSION}/${{ env.version }}-node14/g" -e "s/\${DOCKERTAG}/beta-node14/g" ./manifest.yml > manifest_beta-node14.yaml
|
sed -e "s/\${VERSION}/${{ env.version }}-node16/g" -e "s/\${DOCKERTAG}/beta-node16/g" ./manifest.yml > manifest_beta-node16.yaml
|
||||||
./manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_beta-node14.yaml
|
./manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_beta-node16.yaml
|
||||||
sed -e "s/\${VERSION}/${{ env.version }}-node14/g" -e "s/\${DOCKERTAG}/beta-node14/g" ./manifest_ghcr.yml > manifest_ghcr_beta-node14.yaml
|
sed -e "s/\${VERSION}/${{ env.version }}-node16/g" -e "s/\${DOCKERTAG}/beta-node16/g" ./manifest_ghcr.yml > manifest_ghcr_beta-node16.yaml
|
||||||
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_beta-node14.yaml
|
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_beta-node16.yaml
|
||||||
sed -e "s/\${VERSION}/${{ env.version }}-node14/g" -e "s/\${DOCKERTAG}/${{ env.version }}-node14/g" ./manifest.yml > manifest_version-node14.yaml
|
sed -e "s/\${VERSION}/${{ env.version }}-node16/g" -e "s/\${DOCKERTAG}/${{ env.version }}-node16/g" ./manifest.yml > manifest_version-node16.yaml
|
||||||
./manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_version-node14.yaml
|
./manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_version-node16.yaml
|
||||||
sed -e "s/\${VERSION}/${{ env.version }}-node14/g" -e "s/\${DOCKERTAG}/${{ env.version }}-node14/g" ./manifest_ghcr.yml > manifest_ghcr_version-node14.yaml
|
sed -e "s/\${VERSION}/${{ env.version }}-node16/g" -e "s/\${DOCKERTAG}/${{ env.version }}-node16/g" ./manifest_ghcr.yml > manifest_ghcr_version-node16.yaml
|
||||||
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_version-node14.yaml
|
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_version-node16.yaml
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub packages
|
- name: Delete untagged images from GitHub packages
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
github-token: ${{ secrets.PACKAGES_PASS }}
|
||||||
script: |
|
script: |
|
||||||
46
.github/workflows/build-debian-image-beta.yml
vendored
46
.github/workflows/build-debian-image-beta.yml
vendored
@@ -1,25 +1,23 @@
|
|||||||
# Github action to build Docker image from beta branch (tag: beta)
|
# Github action to build Docker image from beta branch (tag: beta)
|
||||||
name: Build debian based image (beta)
|
name: Build debian beta
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types: [prereleased]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- beta
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
schedule:
|
|
||||||
- cron: '42 3 * * 1'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bulid-beta-image:
|
build-beta-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo (beta)
|
- name: Getting published prerelease tag
|
||||||
uses: actions/checkout@v2.3.4
|
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2.4.0
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: 'beta'
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
|
|
||||||
- name: Get and write version and date
|
- name: Get and write version and date
|
||||||
id: version
|
id: version
|
||||||
@@ -37,8 +35,8 @@ jobs:
|
|||||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
||||||
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
||||||
# amd64
|
# amd64
|
||||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node12/Dockerfile > ./debian/node12/Dockerfile.tmp
|
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node14/Dockerfile > ./debian/node14/Dockerfile.tmp
|
||||||
mv -f ./debian/node12/Dockerfile.tmp ./debian/node12/Dockerfile
|
mv -f ./debian/node14/Dockerfile.tmp ./debian/node14/Dockerfile
|
||||||
|
|
||||||
- name: Set up manifest tool
|
- name: Set up manifest tool
|
||||||
run: |
|
run: |
|
||||||
@@ -50,26 +48,26 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1.5.1
|
uses: docker/setup-buildx-action@v1.6.0
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
username: ${{ secrets.PACKAGES_USER }}
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build Docker image (amd64)
|
- name: Build Docker image (amd64)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: |
|
tags: |
|
||||||
@@ -77,10 +75,10 @@ jobs:
|
|||||||
ghcr.io/buanet/iobroker:${{ env.version }}-amd64
|
ghcr.io/buanet/iobroker:${{ env.version }}-amd64
|
||||||
|
|
||||||
- name: Build Docker image (arm32v7)
|
- name: Build Docker image (arm32v7)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm/v7
|
platforms: linux/arm/v7
|
||||||
tags: |
|
tags: |
|
||||||
@@ -88,10 +86,10 @@ jobs:
|
|||||||
ghcr.io/buanet/iobroker:${{ env.version }}-arm32v7
|
ghcr.io/buanet/iobroker:${{ env.version }}-arm32v7
|
||||||
|
|
||||||
- name: Build Docker image (arm64v8)
|
- name: Build Docker image (arm64v8)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64/v8
|
platforms: linux/arm64/v8
|
||||||
tags: |
|
tags: |
|
||||||
@@ -110,7 +108,7 @@ jobs:
|
|||||||
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_version.yaml
|
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_version.yaml
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub packages
|
- name: Delete untagged images from GitHub packages
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
github-token: ${{ secrets.PACKAGES_PASS }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
@@ -1,21 +1,18 @@
|
|||||||
# Github action to build Docker image from dev branch (tag: dev)
|
# Github action to build Docker image from dev branch (tag: dev)
|
||||||
name: Build debian based image (dev-node14)
|
name: Build debian dev-node16
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bulid-dev-node14-image:
|
build-dev-node16-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo (dev)
|
- name: Checkout repo (dev)
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.4.0
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: 'dev'
|
ref: 'main'
|
||||||
|
|
||||||
- name: Get and write version and date
|
- name: Get and write version and date
|
||||||
id: version
|
id: version
|
||||||
@@ -33,8 +30,8 @@ jobs:
|
|||||||
sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
||||||
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
||||||
# amd64
|
# amd64
|
||||||
sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${DATI}/$DATI/" ./debian/node14/Dockerfile > ./debian/node14/Dockerfile.tmp
|
sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${DATI}/$DATI/" ./debian/node16/Dockerfile > ./debian/node16/Dockerfile.tmp
|
||||||
mv -f ./debian/node14/Dockerfile.tmp ./debian/node14/Dockerfile
|
mv -f ./debian/node16/Dockerfile.tmp ./debian/node16/Dockerfile
|
||||||
|
|
||||||
- name: Set up manifest tool
|
- name: Set up manifest tool
|
||||||
run: |
|
run: |
|
||||||
@@ -46,63 +43,63 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1.5.1
|
uses: docker/setup-buildx-action@v1.6.0
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
username: ${{ secrets.PACKAGES_USER }}
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build Docker image (node14-amd64)
|
- name: Build Docker image (node16-amd64)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node14/Dockerfile
|
file: ./debian/node16/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: |
|
tags: |
|
||||||
buanet/iobroker:dev-node14-amd64,
|
buanet/iobroker:dev-node16-amd64,
|
||||||
ghcr.io/buanet/iobroker:dev-node14-amd64
|
ghcr.io/buanet/iobroker:dev-node16-amd64
|
||||||
|
|
||||||
- name: Build Docker image (node14-arm32v7)
|
- name: Build Docker image (node16-arm32v7)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node14/Dockerfile
|
file: ./debian/node16/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm/v7
|
platforms: linux/arm/v7
|
||||||
tags: |
|
tags: |
|
||||||
buanet/iobroker:dev-node14-arm32v7,
|
buanet/iobroker:dev-node16-arm32v7,
|
||||||
ghcr.io/buanet/iobroker:dev-node14-arm32v7
|
ghcr.io/buanet/iobroker:dev-node16-arm32v7
|
||||||
|
|
||||||
- name: Build Docker image (node14-arm64v8)
|
- name: Build Docker image (node16-arm64v8)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node14/Dockerfile
|
file: ./debian/node16/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64/v8
|
platforms: linux/arm64/v8
|
||||||
tags: |
|
tags: |
|
||||||
buanet/iobroker:dev-node14-arm64v8,
|
buanet/iobroker:dev-node16-arm64v8,
|
||||||
ghcr.io/buanet/iobroker:dev-node14-arm64v8
|
ghcr.io/buanet/iobroker:dev-node16-arm64v8
|
||||||
|
|
||||||
- name: Create and push manifests
|
- name: Create and push manifests
|
||||||
run: |
|
run: |
|
||||||
sed -e "s/\${VERSION}/dev-node14/g" -e "s/\${DOCKERTAG}/dev-node14/g" ./manifest.yml > manifest_dev-node14.yaml
|
sed -e "s/\${VERSION}/dev-node16/g" -e "s/\${DOCKERTAG}/dev-node16/g" ./manifest.yml > manifest_dev-node16.yaml
|
||||||
./manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_dev-node14.yaml
|
./manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_dev-node16.yaml
|
||||||
sed -e "s/\${VERSION}/dev-node14/g" -e "s/\${DOCKERTAG}/dev-node14/g" ./manifest_ghcr.yml > manifest_ghcr_dev-node14.yaml
|
sed -e "s/\${VERSION}/dev-node16/g" -e "s/\${DOCKERTAG}/dev-node16/g" ./manifest_ghcr.yml > manifest_ghcr_dev-node16.yaml
|
||||||
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_dev-node14.yaml
|
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_dev-node16.yaml
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub packages
|
- name: Delete untagged images from GitHub packages
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
github-token: ${{ secrets.PACKAGES_PASS }}
|
||||||
script: |
|
script: |
|
||||||
35
.github/workflows/build-debian-image-dev.yml
vendored
35
.github/workflows/build-debian-image-dev.yml
vendored
@@ -1,21 +1,18 @@
|
|||||||
# Github action to build Docker image from dev branch (tag: dev)
|
# Github action to build Docker image from dev branch (tag: dev)
|
||||||
name: Build debian based image (dev)
|
name: Build debian dev
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bulid-dev-image:
|
build-dev-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo (dev)
|
- name: Checkout repo (dev)
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.4.0
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: 'dev'
|
ref: 'main'
|
||||||
|
|
||||||
- name: Get and write version and date
|
- name: Get and write version and date
|
||||||
id: version
|
id: version
|
||||||
@@ -33,8 +30,8 @@ jobs:
|
|||||||
sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
||||||
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
||||||
# amd64
|
# amd64
|
||||||
sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${DATI}/$DATI/" ./debian/node12/Dockerfile > ./debian/node12/Dockerfile.tmp
|
sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${DATI}/$DATI/" ./debian/node14/Dockerfile > ./debian/node14/Dockerfile.tmp
|
||||||
mv -f ./debian/node12/Dockerfile.tmp ./debian/node12/Dockerfile
|
mv -f ./debian/node14/Dockerfile.tmp ./debian/node14/Dockerfile
|
||||||
|
|
||||||
- name: Set up manifest tool
|
- name: Set up manifest tool
|
||||||
run: |
|
run: |
|
||||||
@@ -46,26 +43,26 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1.5.1
|
uses: docker/setup-buildx-action@v1.6.0
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
username: ${{ secrets.PACKAGES_USER }}
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build Docker image (amd64)
|
- name: Build Docker image (amd64)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: |
|
tags: |
|
||||||
@@ -73,10 +70,10 @@ jobs:
|
|||||||
ghcr.io/buanet/iobroker:dev-amd64
|
ghcr.io/buanet/iobroker:dev-amd64
|
||||||
|
|
||||||
- name: Build Docker image (arm32v7)
|
- name: Build Docker image (arm32v7)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm/v7
|
platforms: linux/arm/v7
|
||||||
tags: |
|
tags: |
|
||||||
@@ -84,10 +81,10 @@ jobs:
|
|||||||
ghcr.io/buanet/iobroker:dev-arm32v7
|
ghcr.io/buanet/iobroker:dev-arm32v7
|
||||||
|
|
||||||
- name: Build Docker image (arm64v8)
|
- name: Build Docker image (arm64v8)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64/v8
|
platforms: linux/arm64/v8
|
||||||
tags: |
|
tags: |
|
||||||
@@ -102,7 +99,7 @@ jobs:
|
|||||||
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_dev.yaml
|
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_dev.yaml
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub packages
|
- name: Delete untagged images from GitHub packages
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
github-token: ${{ secrets.PACKAGES_PASS }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
@@ -1,25 +1,29 @@
|
|||||||
# Github action to build Docker image from main branch for iobroker/iobroker (tag: latest)
|
# Github action to build Docker image from main branch for iobroker/iobroker (tag: latest)
|
||||||
name: Build debian based image (latest)
|
name: Build debian latest (iobroker)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- released
|
||||||
schedule:
|
workflow_dispatch:
|
||||||
- cron: '42 3 * * 5'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bulid-latest-image:
|
build-latest-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo (main)
|
- name: Fetching latest release tag
|
||||||
uses: actions/checkout@v2.3.4
|
run: |
|
||||||
|
LATESTRELEASE="$(curl -sL https://api.github.com/repos/buanet/ioBroker.docker/releases/latest | jq -r '.tag_name')"
|
||||||
|
echo "Latest release tag : $LATESTRELEASE"
|
||||||
|
echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2.4.0
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: 'main'
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
|
|
||||||
- name: Get and write version and date
|
- name: Fetching and adding version tag and date
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
VERSION="$(cat .VERSION)"
|
VERSION="$(cat .VERSION)"
|
||||||
@@ -35,8 +39,8 @@ jobs:
|
|||||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
||||||
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
||||||
# amd64
|
# amd64
|
||||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node12/Dockerfile > ./debian/node12/Dockerfile.tmp
|
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node14/Dockerfile > ./debian/node14/Dockerfile.tmp
|
||||||
mv -f ./debian/node12/Dockerfile.tmp ./debian/node12/Dockerfile
|
mv -f ./debian/node14/Dockerfile.tmp ./debian/node14/Dockerfile
|
||||||
|
|
||||||
- name: Set up manifest tool
|
- name: Set up manifest tool
|
||||||
run: |
|
run: |
|
||||||
@@ -48,39 +52,39 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1.5.1
|
uses: docker/setup-buildx-action@v1.6.0
|
||||||
|
|
||||||
- name: Login to DockerHub (iobroker)
|
- name: Login to DockerHub (iobroker)
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER_IOB }}
|
username: ${{ secrets.DOCKER_USER_IOB }}
|
||||||
password: ${{ secrets.DOCKER_PASS_IOB }}
|
password: ${{ secrets.DOCKER_PASS_IOB }}
|
||||||
|
|
||||||
- name: Build Docker image (amd64)
|
- name: Build Docker image (amd64)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: |
|
tags: |
|
||||||
iobroker/iobroker:${{ env.version }}-amd64,
|
iobroker/iobroker:${{ env.version }}-amd64,
|
||||||
|
|
||||||
- name: Build Docker image (arm32v7)
|
- name: Build Docker image (arm32v7)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm/v7
|
platforms: linux/arm/v7
|
||||||
tags: |
|
tags: |
|
||||||
iobroker/iobroker:${{ env.version }}-arm32v7,
|
iobroker/iobroker:${{ env.version }}-arm32v7,
|
||||||
|
|
||||||
- name: Build Docker image (arm64v8)
|
- name: Build Docker image (arm64v8)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64/v8
|
platforms: linux/arm64/v8
|
||||||
tags: |
|
tags: |
|
||||||
@@ -1,25 +1,29 @@
|
|||||||
# Github action to build Docker image from main branch (tag: latest)
|
# Github action to build Docker image from main branch (tag: latest)
|
||||||
name: Build debian based image (latest)
|
name: Build debian latest (buanet)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- released
|
||||||
schedule:
|
workflow_dispatch:
|
||||||
- cron: '42 3 * * 5'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bulid-latest-image:
|
build-latest-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo (main)
|
- name: Fetching latest release tag
|
||||||
uses: actions/checkout@v2.3.4
|
run: |
|
||||||
|
LATESTRELEASE="$(curl -sL https://api.github.com/repos/buanet/ioBroker.docker/releases/latest | jq -r '.tag_name')"
|
||||||
|
echo "Latest release tag : $LATESTRELEASE"
|
||||||
|
echo "RELEASE_TAG=$LATESTRELEASE" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2.4.0
|
||||||
with:
|
with:
|
||||||
repository: 'buanet/ioBroker.docker'
|
repository: 'buanet/ioBroker.docker'
|
||||||
ref: 'main'
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
|
|
||||||
- name: Get and write version and date
|
- name: Fetching and adding version tag and date
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
VERSION="$(cat .VERSION)"
|
VERSION="$(cat .VERSION)"
|
||||||
@@ -35,8 +39,8 @@ jobs:
|
|||||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
|
||||||
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
|
||||||
# amd64
|
# amd64
|
||||||
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node12/Dockerfile > ./debian/node12/Dockerfile.tmp
|
sed -e "s/\${VERSION}/$VERSION/" -e "s/\${DATI}/$DATI/" ./debian/node14/Dockerfile > ./debian/node14/Dockerfile.tmp
|
||||||
mv -f ./debian/node12/Dockerfile.tmp ./debian/node12/Dockerfile
|
mv -f ./debian/node14/Dockerfile.tmp ./debian/node14/Dockerfile
|
||||||
|
|
||||||
- name: Set up manifest tool
|
- name: Set up manifest tool
|
||||||
run: |
|
run: |
|
||||||
@@ -48,26 +52,26 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1.5.1
|
uses: docker/setup-buildx-action@v1.6.0
|
||||||
|
|
||||||
- name: Login to DockerHub (buanet)
|
- name: Login to DockerHub (buanet)
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.14.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
username: ${{ secrets.PACKAGES_USER }}
|
||||||
password: ${{ secrets.PACKAGES_PASS }}
|
password: ${{ secrets.PACKAGES_PASS }}
|
||||||
|
|
||||||
- name: Build Docker image (amd64)
|
- name: Build Docker image (amd64)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: |
|
tags: |
|
||||||
@@ -75,10 +79,10 @@ jobs:
|
|||||||
ghcr.io/buanet/iobroker:${{ env.version }}-amd64
|
ghcr.io/buanet/iobroker:${{ env.version }}-amd64
|
||||||
|
|
||||||
- name: Build Docker image (arm32v7)
|
- name: Build Docker image (arm32v7)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm/v7
|
platforms: linux/arm/v7
|
||||||
tags: |
|
tags: |
|
||||||
@@ -86,10 +90,10 @@ jobs:
|
|||||||
ghcr.io/buanet/iobroker:${{ env.version }}-arm32v7
|
ghcr.io/buanet/iobroker:${{ env.version }}-arm32v7
|
||||||
|
|
||||||
- name: Build Docker image (arm64v8)
|
- name: Build Docker image (arm64v8)
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: ./debian
|
context: ./debian
|
||||||
file: ./debian/node12/Dockerfile
|
file: ./debian/node14/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64/v8
|
platforms: linux/arm64/v8
|
||||||
tags: |
|
tags: |
|
||||||
@@ -112,7 +116,7 @@ jobs:
|
|||||||
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_version.yaml
|
./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_version.yaml
|
||||||
|
|
||||||
- name: Delete untagged images from GitHub packages
|
- name: Delete untagged images from GitHub packages
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PACKAGES_PASS }}
|
github-token: ${{ secrets.PACKAGES_PASS }}
|
||||||
script: |
|
script: |
|
||||||
52
.github/workflows/check-js-controller-release.yml
vendored
Normal file
52
.github/workflows/check-js-controller-release.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
name: Check js-controller release
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '42 23 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-and-trigger:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2.4.0
|
||||||
|
with:
|
||||||
|
repository: 'buanet/ioBroker.docker'
|
||||||
|
token: ${{ secrets.ACTIONS_PAT }}
|
||||||
|
|
||||||
|
- name: Fetch js-controller release version
|
||||||
|
run: |
|
||||||
|
curl -sL https://repo.iobroker.live/sources-dist.json | \
|
||||||
|
jq -r '."js-controller".version' > .github/dependencies/.js-controller-version
|
||||||
|
# curl -sL https://api.github.com/repos/ioBroker/ioBroker.js-controller/releases/latest | \
|
||||||
|
# jq -r ".tag_name" > .github/dependencies/.js-controller-version
|
||||||
|
echo "[LOG] Fetched js-controller version is $(cat .github/dependencies/.js-controller-version)"
|
||||||
|
|
||||||
|
- name: Check for modified files
|
||||||
|
id: git-check
|
||||||
|
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
|
||||||
|
|
||||||
|
- name: Commit latest release version
|
||||||
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
|
run: |
|
||||||
|
git config --global user.name 'buanet'
|
||||||
|
git config --global user.email 'info@buanet.de'
|
||||||
|
git commit -am "new js-controller release"
|
||||||
|
git push
|
||||||
|
|
||||||
|
- name: Trigger build debian latest (buanet)
|
||||||
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
|
uses: benc-uk/workflow-dispatch@v1.1
|
||||||
|
with:
|
||||||
|
workflow: Build debian latest (buanet)
|
||||||
|
repo: buanet/ioBroker.docker
|
||||||
|
token: ${{ secrets.ACTIONS_PAT }}
|
||||||
|
|
||||||
|
- name: Trigger build debian latest (iobroker)
|
||||||
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
|
uses: benc-uk/workflow-dispatch@v1.1
|
||||||
|
with:
|
||||||
|
workflow: Build debian latest (iobroker)
|
||||||
|
repo: buanet/ioBroker.docker
|
||||||
|
token: ${{ secrets.ACTIONS_PAT }}
|
||||||
33
.github/workflows/testing-docker-image.yml
vendored
Normal file
33
.github/workflows/testing-docker-image.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Github action for testing the Docker image
|
||||||
|
name: Testing Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-docker-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Testing with docker run
|
||||||
|
run: |
|
||||||
|
echo "[LOG] Starting ioBroker Container..."
|
||||||
|
docker run -d -p 8081:8081 --name iobroker -v iobrokerdata:/opt/iobroker buanet/iobroker:latest
|
||||||
|
echo "[LOG] Done."
|
||||||
|
echo ' '
|
||||||
|
echo "[LOG] Waiting for Startup Script..."
|
||||||
|
sleep 30
|
||||||
|
echo "[LOG] Done."
|
||||||
|
echo ' '
|
||||||
|
echo "[LOG] Writing Logs..."
|
||||||
|
docker logs iobroker >& testrun.log
|
||||||
|
echo "[LOG] Done."
|
||||||
|
echo ' '
|
||||||
|
echo "[LOG] Checking Web UI..."
|
||||||
|
curl --insecure http://127.0.0.1:8081 2> /dev/null | grep '<title>Admin</title>' &> /dev/null || exit 1
|
||||||
|
echo "[LOG] Done."
|
||||||
|
echo ' '
|
||||||
|
echo "[LOG] Output testrun.log:"
|
||||||
|
cat testrun.log
|
||||||
|
echo ' '
|
||||||
|
echo "[LOG] Test sucesssful."
|
||||||
|
echo ' '
|
||||||
49
CHANGELOG.md
49
CHANGELOG.md
@@ -1,10 +1,35 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### v5.2.0-beta4 (2021-09-10)
|
### v6.1.0 (2022-03-01)
|
||||||
* adding iobroker user rights for "gosu"
|
* v6.1.0-beta.2 (2022-02-11)
|
||||||
* adding more labels in OCI standard format
|
* fix -kbn option in maintenance script
|
||||||
* fixing workdir bug
|
* optimize shutdown/ prevent warnings on upgrade
|
||||||
* adding backitup compatibility
|
* remove hostname check for multihost slave
|
||||||
|
* optimize startup script logging
|
||||||
|
* add breaks and optimize maintenance script (fixes [#233](https://github.com/buanet/ioBroker.docker/issues/233))
|
||||||
|
* v6.1.0-beta.1 (2021-12-23)
|
||||||
|
* some more corrections in maintenance script ([#232 @agross](https://github.com/buanet/ioBroker.docker/pull/232))
|
||||||
|
* add auto confirm parameter to upgrade function in maintenance script ([#229 @thost96](https://github.com/buanet/ioBroker.docker/pull/229))
|
||||||
|
* add alias "m" for maintenance script
|
||||||
|
|
||||||
|
### v6.0.0 (2021-12-09)
|
||||||
|
* move docu/ restructuring readme
|
||||||
|
* v6.0.0-beta1 (2021-10-07)
|
||||||
|
* upgrade node version to recommended node14
|
||||||
|
* add beta-node16 tag for beta testing node16
|
||||||
|
* update documentation
|
||||||
|
* v5.3.0-beta1 (2021-10-07)
|
||||||
|
* add check (installed) PACKAGES on startup (fixes [#201](https://github.com/buanet/ioBroker.docker/issues/201))
|
||||||
|
* add packages for discovery adapter
|
||||||
|
* add packages for backitup adapter
|
||||||
|
* reorganize Dockerfile
|
||||||
|
|
||||||
|
### v5.2.0 (2021-09-30)
|
||||||
|
* v5.2.0-beta4 (2021-09-10)
|
||||||
|
* adding iobroker user rights for "gosu"
|
||||||
|
* adding more labels in OCI standard format
|
||||||
|
* fixing workdir bug
|
||||||
|
* adding backitup compatibility
|
||||||
* v5.2.0-beta3 (2021-09-04)
|
* v5.2.0-beta3 (2021-09-04)
|
||||||
* reducing layers in dockerfile
|
* reducing layers in dockerfile
|
||||||
* making hostname check mandatory for startup
|
* making hostname check mandatory for startup
|
||||||
@@ -16,12 +41,12 @@
|
|||||||
* adding labels in OCI standard format
|
* adding labels in OCI standard format
|
||||||
* adding packages update on first start
|
* adding packages update on first start
|
||||||
* adding file for docker detection by ioBroker adapters
|
* adding file for docker detection by ioBroker adapters
|
||||||
* adding best practice for states db migation in readme
|
* adding best practice for states db migration in readme
|
||||||
* removing couchdb option for states db (no longer supported)
|
* removing couchdb option for states db (no longer supported)
|
||||||
* v5.2.0-beta1 (2021-05-04)
|
* v5.2.0-beta1 (2021-05-04)
|
||||||
* added upgrade parameter to maintenance script
|
* added upgrade parameter to maintenance script
|
||||||
* added expose for default admin ui port (#172)
|
* added expose for default admin ui port (fixes [#172](https://github.com/buanet/ioBroker.docker/issues/172))
|
||||||
* added shortform for maintenance script
|
* added short form for maintenance script
|
||||||
* v5.2.0-beta (2021-04-02)
|
* v5.2.0-beta (2021-04-02)
|
||||||
* some renaming to optimize automated build
|
* some renaming to optimize automated build
|
||||||
* changes in versioning
|
* changes in versioning
|
||||||
@@ -30,7 +55,7 @@
|
|||||||
### v5.1.0 (2020-11-05)
|
### v5.1.0 (2020-11-05)
|
||||||
* v5.0.2-beta (2020-07-28)
|
* v5.0.2-beta (2020-07-28)
|
||||||
* added docker tag for majorversion latest
|
* added docker tag for majorversion latest
|
||||||
* extend readme.md doku
|
* extend readme.md docu
|
||||||
* added maintenance script
|
* added maintenance script
|
||||||
* added container healthcheck
|
* added container healthcheck
|
||||||
* fixed configuration procedure and logging for objects and states db setup
|
* fixed configuration procedure and logging for objects and states db setup
|
||||||
@@ -71,7 +96,7 @@
|
|||||||
### v4.1.0 (2020-01-17)
|
### v4.1.0 (2020-01-17)
|
||||||
* improved readme.md
|
* improved readme.md
|
||||||
* v4.0.3-beta (2020-01-06)
|
* v4.0.3-beta (2020-01-06)
|
||||||
* added support to restore backup on startup
|
* added support to restore backup on startup ([#56 @duffbeer2000](https://github.com/buanet/ioBroker.docker/pull/56))
|
||||||
* small fixes according to "docker best practices"
|
* small fixes according to "docker best practices"
|
||||||
* v4.0.2-beta (2019-12-10)
|
* v4.0.2-beta (2019-12-10)
|
||||||
* ~~added env for activating redis~~
|
* ~~added env for activating redis~~
|
||||||
@@ -91,13 +116,13 @@
|
|||||||
* v3.1.2-beta (2019-09-03)
|
* v3.1.2-beta (2019-09-03)
|
||||||
* using node 10 instead of node 8
|
* using node 10 instead of node 8
|
||||||
* v3.1.1-beta (2019-09-02)
|
* v3.1.1-beta (2019-09-02)
|
||||||
* adding env for setting uid/ gid for iobroker-user
|
* adding env for setting uid/ gid for iobroker-user ([#33 @mplogas](https://github.com/buanet/ioBroker.docker/pull/33))
|
||||||
|
|
||||||
### v3.1.0 (2019-08-21)
|
### v3.1.0 (2019-08-21)
|
||||||
* v3.0.3-beta (2019-08-21)
|
* v3.0.3-beta (2019-08-21)
|
||||||
* switching base image from "debian:latest" to "debian:stretch"
|
* switching base image from "debian:latest" to "debian:stretch"
|
||||||
* v3.0.2-beta (2019-06-13)
|
* v3.0.2-beta (2019-06-13)
|
||||||
* using gosu instead of sudo
|
* using gosu instead of sudo ([#26 @SchumyHao](https://github.com/buanet/ioBroker.docker/pull/26))
|
||||||
* changing output of ioBroker logging
|
* changing output of ioBroker logging
|
||||||
* v3.0.1-beta (2019-05-18)
|
* v3.0.1-beta (2019-05-18)
|
||||||
* ~~switching back to iobroker-daemon for startup~~
|
* ~~switching back to iobroker-daemon for startup~~
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017 André Germann
|
Copyright (c) 2017-2021 André Germann
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
210
README.md
210
README.md
@@ -1,209 +1,83 @@
|
|||||||
# Official Docker Image for ioBroker
|
# Official Docker Image for ioBroker
|
||||||
|
|
||||||
[](https://github.com/buanet/ioBroker.docker)
|
<img src="https://github.com/buanet/ioBroker.docker/raw/main/docs/img/iobroker_logo.png" width="600" title="ioBroker Logo">
|
||||||
|
|
||||||
[](https://github.com/buanet/ioBroker.docker/releases)
|
[](https://github.com/buanet/ioBroker.docker/releases)
|
||||||
[](https://github.com/buanet/ioBroker.docker/issues)<br>
|
[](https://github.com/buanet/ioBroker.docker/releases)
|
||||||
|
[)](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-latest.yml)
|
||||||
|
[](https://github.com/buanet/ioBroker.docker/issues)
|
||||||
|
[](https://github.com/buanet/ioBroker.docker/discussions)<br>
|
||||||
|
[](https://hub.docker.com/repository/docker/buanet/iobroker)
|
||||||
[](https://hub.docker.com/repository/docker/buanet/iobroker)
|
[](https://hub.docker.com/repository/docker/buanet/iobroker)
|
||||||
[](https://hub.docker.com/repository/docker/buanet/iobroker)
|
[](https://hub.docker.com/repository/docker/buanet/iobroker)
|
||||||
[](https://hub.docker.com/repository/docker/buanet/iobroker)<br>
|
[](https://hub.docker.com/repository/docker/buanet/iobroker)<br>
|
||||||
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
|
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
|
||||||
|
[](https://github.com/buanet/ioBroker.docker)
|
||||||
|
[](https://github.com/buanet/ioBroker.docker/network)
|
||||||
|
[](https://github.com/buanet/ioBroker.docker/stargazers)
|
||||||
[](https://paypal.me/buanet)
|
[](https://paypal.me/buanet)
|
||||||
|
|
||||||
This image is a ready to use Docker image for ioBroker IoT platform (http://www.iobroker.net).
|
The code provided in this repo is used to automatically generate the official Docker Image for ioBroker.
|
||||||
|
|
||||||
It was originally created for running on a Synology DiskStation 1515+ with DSM 6 and official Docker package installed, but should run on any other Linux based Docker host too.
|
Because this README has become more and more confusing, I decided to convert it into a full documentation and moved it to a ["better place"](https://docs.buanet.de/iobroker-docker-image/docs/).
|
||||||
|
|
||||||
After years of development it might be the best documented and maintained Docker image for running ioBroker IoT platform with Docker.
|
## :rocket: Quick links
|
||||||
|
|
||||||
Since v4.0.0 the image is available for the following architectures: amd64, armv7hf, aarch64.
|
Don't know what's ioBroker? :arrow_right: [iobroker.net](https://www.iobroker.net)<br>
|
||||||
|
Don't know what's Docker? :arrow_right: [docker.com](https://docker.com)<br>
|
||||||
|
Looking for documentation? :arrow_right: [docs.buanet.de](https://docs.buanet.de/iobroker-docker-image/docs/)
|
||||||
|
|
||||||
In v5.1.0 it became the official Docker Image for the ioBroker Project.
|
## :question: FAQ (frequently asked questions)
|
||||||
|
|
||||||
## Important notice
|
### How to run the image?
|
||||||
|
|
||||||
In general a new major version (e.g. v2, v4, v5) of the image comes with a new, preinstalled major node version!
|
You can find some basic information about the image amd how to run it on the [Docker Hub page](https://hub.docker.com/r/buanet/iobroker) or [here](https://github.com/buanet/ioBroker.docker/blob/main/docs/README_docker_hub_buanet.md).
|
||||||
If you are updating an existing installation to a new major version (e.g. from v4 to v5) you have to perform some additional steps inside ioBroker! For more details please see official ioBroker documentation: [EN](https://www.iobroker.net/#en/documentation/install/updatenode.md) | [DE](https://www.iobroker.net/#de/documentation/install/updatenode.md).<br>
|
|
||||||
|
|
||||||
You might avoid these procedure if you use my "Best practice" hint for "upgrading your ioBroker container".
|
### Is there a more detailed documentation?
|
||||||
|
|
||||||
In any case make a backup first!
|
You can find a detailed documentation of the image on the new [docs page](https://docs.buanet.de/iobroker-docker-image/docs/).
|
||||||
|
|
||||||
## Getting started
|
### Where can I pull the image?
|
||||||
|
|
||||||
A detailed tutorial (German, based on v3.0.0) can be found here: [https://smarthome.buanet.de](https://smarthome.buanet.de/2019/05/iobroker-unter-docker-auf-der-synology-diskstation-v3/). Please notice that the old tutorial is outdated and does no longer work!
|
You can pull the Docker image from:
|
||||||
|
* [Docker Hub (buanet)](https://hub.docker.com/r/buanet/iobroker)
|
||||||
|
* [Docker Hub (iobroker)](https://hub.docker.com/r/iobroker/iobroker)
|
||||||
|
* [GitHub Container Repo](https://github.com/buanet/ioBroker.docker/pkgs/container/iobroker)
|
||||||
|
|
||||||
For discussion and support please visit [ioBroker forum thread](http://forum.iobroker.net/viewtopic.php?f=17&t=5089) or use the comments section at the linked tutorial.
|
### Where can I get help?
|
||||||
|
|
||||||
Please do not contact me directly for any support-reasons. Every support question should be answered in a public place so every user can benefit from it . Thanks in advance.
|
If you have any questions or need help please visit the ioBroker community:
|
||||||
|
* [ioBroker forum](https://forum.iobroker.net/)
|
||||||
|
* [Discord channel](https://discord.gg/Ne3y6fUac3)
|
||||||
|
* [Facebook group](https://www.facebook.com/groups/440499112958264/)
|
||||||
|
|
||||||
If you think you found a bug or simply want to request a new feature please open an issue on Github so we can talk about.
|
### How to report an issue or request a feature?
|
||||||
|
|
||||||
The following ways to get iobroker-container running are only examples. Maybe you have to change, add or replace parameters to configure ioBroker for fitting your needs.
|
If you think you found an issue let us know by opening a [GitHub issue](https://github.com/buanet/ioBroker.docker/issues). Make sure you have googled it before.
|
||||||
|
Please do not use the issues for support questions. Not every error message is worth a new report. Use [discussions](https://github.com/buanet/ioBroker.docker/discussions) if you are not sure.
|
||||||
|
|
||||||
### Running from command line
|
## :eyes: Miscellaneous
|
||||||
|
|
||||||
For taking a first look at the iobroker docker container it would be enough to simply run the following basic docker run command:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker run -p 8081:8081 --name iobroker -v iobrokerdata:/opt/iobroker buanet/iobroker:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running with docker-compose
|
|
||||||
|
|
||||||
You can also run iobroker by using docker-compose. Here is an example:
|
|
||||||
|
|
||||||
```
|
|
||||||
version: '2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
iobroker:
|
|
||||||
restart: always
|
|
||||||
image: buanet/iobroker:latest
|
|
||||||
container_name: iobroker
|
|
||||||
hostname: iobroker
|
|
||||||
ports:
|
|
||||||
- "8081:8081"
|
|
||||||
volumes:
|
|
||||||
- iobrokerdata:/opt/iobroker
|
|
||||||
```
|
|
||||||
|
|
||||||
## Special settings and features
|
|
||||||
|
|
||||||
The following will give a short overview.
|
|
||||||
|
|
||||||
### Environment variables
|
|
||||||
|
|
||||||
To configure the ioBroker container on startup it is possible to set some environment variables.
|
|
||||||
You do not have to declare every single variable when setting up your container. Variables you do not set will come up with their default value.
|
|
||||||
|
|
||||||
**Important: In v4.2.0 the ENVs "ADMINPORT" and "REDIS" were renamed/ reorganized. For Details see the following table!**
|
|
||||||
|
|
||||||
|ENV|Default|Description|
|
|
||||||
|---|---|---|
|
|
||||||
|AVAHI|false|Installs and activates avahi-daemon for supporting yahka-adapter, can be "true" or "false"|
|
|
||||||
|IOB_ADMINPORT|8081|Sets ioBroker adminport on startup|
|
|
||||||
|IOB_MULTIHOST|[not set]|Sets ioBroker instance as "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)|
|
|
||||||
|IOB_OBJECTSDB_HOST|127.0.0.1|Sets host for ioBroker objects db|
|
|
||||||
|IOB_OBJECTSDB_PORT|9001|Sets port for ioBroker objects db|
|
|
||||||
|IOB_OBJECTSDB_TYPE|file|Sets type of ioBroker objects db, cloud be "file" or "redis" <br>(at the moment redis as objects db is [not officially supported by ioBroker](https://github.com/ioBroker/ioBroker#databases))|
|
|
||||||
|IOB_STATESDB_HOST|127.0.0.1|Sets host for ioBroker states db|
|
|
||||||
|IOB_STATESDB_PORT|9000|Sets port for ioBroker states db|
|
|
||||||
|IOB_STATESDB_TYPE|file|Sets type of ioBroker states db, could be "file" or "redis"|
|
|
||||||
|LANG|de_DE.UTF‑8|The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8|
|
|
||||||
|LANGUAGE|de_DE:de|The following locales are pre-generated: de_DE:de, en_US:en|
|
|
||||||
|LC_ALL|de_DE.UTF-8|The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8|
|
|
||||||
|PACKAGES|[not set]|Installs additional linux packages to your container, packages should be seperated by whitespace like this: "package1 package2 package3"|
|
|
||||||
|SETGID|1000|For some reasons it might be useful to specify the gid of the containers iobroker user to match an existing group on the docker host|
|
|
||||||
|SETUID|1000|For some reasons it might be useful to specify the uid of the containers iobroker user to match an existing user on the docker host|
|
|
||||||
|TZ|Europe/Berlin|All valid Linux-timezones|
|
|
||||||
|USBDEVICES|none|Sets relevant permissions on mounted devices like "/dev/ttyACM0", for more than one device separate with ";" like this: "/dev/ttyACM0;/dev/ttyACM1"|
|
|
||||||
|ZWAVE|false|Will install openzwave to support zwave-adapter, can be "true" or "false"|
|
|
||||||
|
|
||||||
### Mounting folder/ volume
|
|
||||||
|
|
||||||
It is possible to mount an empty folder to /opt/iobroker during first startup of the container. The startup script will check this folder and restore content if it is empty.
|
|
||||||
|
|
||||||
Since v4.1.0 it is also possible mount a folder filled up with an iobroker backup file created using `iobroker backup` command or backitup adapter. Please make sure the name of your backup file ends like this: `*_backupiobroker.tar.gz"`.
|
|
||||||
|
|
||||||
The startup script will then detect this backup and restore it during the start of the container. Please see container logs when starting the container for more details!
|
|
||||||
|
|
||||||
Note: It is absolutely recommended to use a mounted folder or persistent volume for /opt/iobroker folder!
|
|
||||||
|
|
||||||
You can also mount a folder containing an existing ioBroker-installation (e.g. when moving an existing installation to docker).
|
|
||||||
But watch for the used node version. If the existing installation runs with another major version of node you have do perform additional steps. For more Details see the "Important notice" on top of this readme.md file.
|
|
||||||
|
|
||||||
**Important: If the folder you mount to /opt/iobroker in your container is placed on a mounted device, partition or other storage, the mountpoint on your host should NOT have the "noexec" flag activated. Otherwise you may get problems executing ioBroker inside the container!**
|
|
||||||
|
|
||||||
### Mounting USB device
|
|
||||||
|
|
||||||
If you want to use a USB device within ioBroker inside your container don´t forget to [mount the device](https://docs.docker.com/engine/reference/commandline/run/#add-host-device-to-container---device) on container startup and use the environment variable "USBDEVICES".
|
|
||||||
|
|
||||||
### User defined startup scripts
|
|
||||||
|
|
||||||
It is possible to add some script code to container startup with the help of the userscripts feature. You can get this to work by mounting an additional folder to `/opt/userscripts` into the container.
|
|
||||||
|
|
||||||
When you mount an empty folder the startup script will restore two example scripts in there. To activate the scripts you have to remove the `_example` part of the name. The "userscript_firststart.sh" will execute only at the very first start of a new container, while the "userscript_everystart.sh" will execute on every container start.
|
|
||||||
|
|
||||||
Feel free to test it with my example code. Take a look at the log. In "Step 4 of 5: Applying special settings" you will see the messages generated by the example userscripts.
|
|
||||||
|
|
||||||
### Multihost
|
|
||||||
|
|
||||||
With the help of the ENV "IOB_MULTIHOST" and the ENVs for objects and states db connections (see ENVs table above) it is now possible to run a container as standalone, multihost master or multihost slave. This is more or less a feature for advanced users. Please make sure you know how ioBroker multihost is working and set the ENVs as with `ìobroker setup custom`.
|
|
||||||
|
|
||||||
There is no need for executing `iobroker multihost enable` or `iobroker multihost connect` inside the container. Just configure the mentioned ENVs. The startup script will do all the magic.
|
|
||||||
|
|
||||||
For general information about iobroker multihost feature please see [official ioBroker documentation](https://www.iobroker.net/docu/index-24.htm?page_id=3068&lang=de).
|
|
||||||
|
|
||||||
### Healthcheck
|
|
||||||
|
|
||||||
Since v5.1.0 the image contains a simple Docker healthcheck. At the moment it only checks if js-controller is running inside the container and reports "healthy" or "unhealthy" to the Docker daemon. Further development is planned.
|
|
||||||
|
|
||||||
The healthcheck is configured to 5 retries in an 15s interval with a timeout of 5s. So a container needs a minimum of one minute to get unhealthy.
|
|
||||||
|
|
||||||
Hint: As the Docker daemon itself gives no opportunity to automatically restart an unhealthy container you might want to setup some kind of "watchdog container" like this simple one: https://github.com/buanet/docker-watchdog.
|
|
||||||
|
|
||||||
### Maintenance script (beta)
|
|
||||||
|
|
||||||
Within the implementation of the docker health check (above) some manual maintenance actions, like stopping ioBroker for upgrading js-controller, would cause the container to get "unhealthy" and may cause an external watchdog to automatically restart it.
|
|
||||||
|
|
||||||
In this case you can use the new maintenance command line tool inside the container. By simply typing `maintenance on` it will activate some kind of "maintenance mode" and automatically stop ioBroker while the container stays healthy.
|
|
||||||
|
|
||||||
After your maintenance is done just type `maintenance off`. Depending on the selected restart policy of your container, the command will stop (and automatically restart) it.
|
|
||||||
|
|
||||||
## Best practices
|
|
||||||
|
|
||||||
### Avoid using "latest" docker tag
|
|
||||||
|
|
||||||
To avoid conflicts when upgrading your container or getting in trouble when accidentally upgrading your container to a new major version I prefer using a version docker tag like "v4.2.0" instead of "latest" for creating your container.
|
|
||||||
|
|
||||||
With v5.1.0 an additional docker tag "latest-[major version]" is available. This gives you the possibility update your container automatically while always staying in the same major version.
|
|
||||||
|
|
||||||
### Upgrading your container
|
|
||||||
|
|
||||||
If you want to upgrade your ioBroker container to a new major version (e.g. from v4 to v5) I would prefer to do that by creating a backup in ioBroker (by "iobroker backup" or backitup adapter) and restoring it to a completely new container. All you need is time an the following steps:
|
|
||||||
* make a backup by command line ("iobroker backup") or backitup adapter
|
|
||||||
* stop the old container
|
|
||||||
* create a new and empty data folder or volume and place your backup file in it
|
|
||||||
* create a new container as your old or as you need it and use the new data folder/ volume for the /opt/iobroker mount point
|
|
||||||
* follow the log output of the container and be patient
|
|
||||||
|
|
||||||
After this steps the startup script inside the container will automatically detect and restore your backup to a new ioBroker instance. When iobroker is started after the restore it will install your adapters to the new ioBroker instance by itself. This might take some time but will give you the best and cleanest results...
|
|
||||||
|
|
||||||
### Switching states db from file to redis
|
|
||||||
|
|
||||||
If you want to switch states db from file to redis on a n existing installation you might want to keep all your actual states. As simply setting the needed ENVs won't migrate your existing states into the redis db it is best practice to first run "iobroker setup custom" inside your container before adding the ENVs. This will give you the choice to migrate your states.
|
|
||||||
|
|
||||||
## Miscellaneous
|
|
||||||
|
|
||||||
### Detecting this Docker image by ioBroker (feature for adapter developers)
|
|
||||||
|
|
||||||
For adapter developers it is now possible to easily detect if ioBroker is running inside the official docker container. Please simply check if the file `/opt/scripts/.docker_config/.thisisdocker` exists. The content of the file will tell the image version.
|
|
||||||
|
|
||||||
### Beta testing
|
### Beta testing
|
||||||
|
|
||||||
If you want to get the newest features and changes feel free to use/ test the beta version of the Docker image. You can find the readme.md file for beta versions [here](https://github.com/buanet/ioBroker.docker/blob/beta/README.md). Please make sure to read the changelog before testing beta versions.
|
If you want to get the newest features and changes feel free to use/ test the beta version of the Docker image. You can find the changelog for beta versions [here](https://github.com/buanet/ioBroker.docker/blob/dev/CHANGELOG.md). For more details and beta support join us at the "docker-image" chat on the [ioBroker Discord channel](https://discord.gg/Ne3y6fUac3).
|
||||||
|
|
||||||
### Subscribe to updates
|
|
||||||
|
|
||||||
If you want the newest updates about the image and my tutorials at https://smarthome.buanet.de you can simply subscribe to my new "news and updates" channel (only in German) on Telegram.
|
|
||||||
You will find the channel here: https://t.me/buanet_tutorials
|
|
||||||
|
|
||||||
### Support the project
|
### Support the project
|
||||||
|
|
||||||
The easiest way to support this project is to leave me some likes/ stars on Github and Docker hub!<br>
|
The easiest way to support this project is to leave me some likes/ stars on Github and Docker hub!<br>
|
||||||
If you want to give something back, feel free to take a look into the [open issues](https://github.com/buanet/ioBroker.docker/issues) or the [ioBroker forum thread](http://forum.iobroker.net/viewtopic.php?f=17&t=5089) and helping me answering questions, fixing bugs or adding new features!<br>
|
If you want to give something back to the community, feel free to take a look into the [open issues](https://github.com/buanet/ioBroker.docker/issues) or the [ioBroker forum thread](http://forum.iobroker.net/viewtopic.php?f=17&t=5089) and help me answering questions, fixing bugs or adding new features!<br>
|
||||||
And if you want to buy me a beer instead, you can do this here: <a href="https://www.paypal.me/buanet" target="_blank"><img src="https://buanet.de/wp-content/uploads/2017/08/pp128.png" height="20" width="20"></a><br>
|
If that doesn't work for you and you want to buy me a beer instead, you can do this here: <a href="https://www.paypal.me/buanet" target="_blank"><img src="https://github.com/buanet/ioBroker.docker/raw/main/docs/img/pp_logo.png" height="15" width="15"></a><br>
|
||||||
Thank you!
|
Thank you!
|
||||||
|
|
||||||
## Changelog
|
## :memo: Changelog
|
||||||
|
|
||||||
Moved to [CHANGELOG.md](CHANGELOG.md).
|
Moved to [CHANGELOG.md](CHANGELOG.md).
|
||||||
|
|
||||||
## License
|
## :copyright: License
|
||||||
|
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017 [André Germann]
|
Copyright (c) 2017-2021 André Germann
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -223,6 +97,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
## Credits
|
## :star: Credits
|
||||||
|
|
||||||
Inspired by https://github.com/MehrCurry/docker-iobroker
|
Inspired by https://github.com/MehrCurry/docker-iobroker
|
||||||
|
|||||||
56
debian/node12/Dockerfile
vendored
56
debian/node12/Dockerfile
vendored
@@ -14,39 +14,42 @@ ENV DEBIAN_FRONTEND noninteractive
|
|||||||
|
|
||||||
# Install prerequisites (including node) and generating locales
|
# Install prerequisites (including node) and generating locales
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
|
apt-utils \
|
||||||
|
cifs-utils \
|
||||||
curl \
|
curl \
|
||||||
gosu \
|
gosu \
|
||||||
|
iputils-ping \
|
||||||
jq \
|
jq \
|
||||||
locales \
|
locales \
|
||||||
|
nfs-common \
|
||||||
procps \
|
procps \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
sudo \
|
sudo \
|
||||||
|
tar \
|
||||||
|
tzdata \
|
||||||
udev \
|
udev \
|
||||||
wget \
|
wget \
|
||||||
# Generating locales
|
|
||||||
&& sed -i 's/^# *\(de_DE.UTF-8\)/\1/' /etc/locale.gen \
|
|
||||||
&& sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \
|
|
||||||
&& locale-gen \
|
|
||||||
# Install node
|
# Install node
|
||||||
&& curl -sL https://deb.nodesource.com/setup_12.x | bash \
|
&& curl -sL https://deb.nodesource.com/setup_12.x | bash \
|
||||||
&& apt-get update && apt-get install -y nodejs \
|
&& apt-get update && apt-get install -y nodejs \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
# Install node-gyp
|
||||||
|
&& npm install -g node-gyp \
|
||||||
|
# Generating locales
|
||||||
|
&& sed -i 's/^# *\(de_DE.UTF-8\)/\1/' /etc/locale.gen \
|
||||||
|
&& sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \
|
||||||
|
&& locale-gen
|
||||||
|
|
||||||
# Create scripts directorys and copy scripts
|
# Create directorys and copy scripts
|
||||||
RUN mkdir -p /opt/scripts/ \
|
COPY scripts /opt/scripts
|
||||||
&& mkdir -p /opt/userscripts/ \
|
COPY userscripts /opt/userscripts
|
||||||
&& chmod 777 /opt/scripts/ \
|
RUN chmod 777 /opt/scripts/ \
|
||||||
&& chmod 777 /opt/userscripts/
|
&& chmod 777 /opt/userscripts/ \
|
||||||
WORKDIR /opt/scripts/
|
&& chmod +x /opt/scripts/*.sh \
|
||||||
COPY scripts/* ./
|
&& chmod +x /opt/userscripts/*.sh
|
||||||
RUN chmod +x *.sh
|
|
||||||
WORKDIR /opt/userscripts/
|
|
||||||
COPY userscripts/* ./
|
|
||||||
RUN chmod +x *.sh
|
|
||||||
|
|
||||||
# Install ioBroker
|
# Install ioBroker
|
||||||
WORKDIR /
|
RUN curl -sL https://iobroker.net/install.sh | bash - \
|
||||||
RUN apt-get update \
|
|
||||||
&& curl -sL https://iobroker.net/install.sh | bash - \
|
|
||||||
&& mkdir -p /opt/scripts/.docker_config/ \
|
&& mkdir -p /opt/scripts/.docker_config/ \
|
||||||
&& echo "starting" > /opt/scripts/.docker_config/.healthcheck \
|
&& echo "starting" > /opt/scripts/.docker_config/.healthcheck \
|
||||||
&& echo "${VERSION}" > /opt/scripts/.docker_config/.thisisdocker \
|
&& echo "${VERSION}" > /opt/scripts/.docker_config/.thisisdocker \
|
||||||
@@ -56,15 +59,20 @@ RUN apt-get update \
|
|||||||
# Backup initial ioBroker and userscript folder
|
# Backup initial ioBroker and userscript folder
|
||||||
&& tar -cf /opt/initial_iobroker.tar /opt/iobroker \
|
&& tar -cf /opt/initial_iobroker.tar /opt/iobroker \
|
||||||
&& tar -cf /opt/initial_userscripts.tar /opt/userscripts \
|
&& tar -cf /opt/initial_userscripts.tar /opt/userscripts \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
# Setting up iobroker-user (shell, home dir and rights)
|
||||||
|
&& chsh -s /bin/bash iobroker \
|
||||||
# Setting up iobroker-user (shell, home dir and rights)
|
|
||||||
RUN chsh -s /bin/bash iobroker \
|
|
||||||
&& usermod --home /opt/iobroker iobroker \
|
&& usermod --home /opt/iobroker iobroker \
|
||||||
&& usermod -u 1000 iobroker \
|
&& usermod -u 1000 iobroker \
|
||||||
&& groupmod -g 1000 iobroker \
|
&& groupmod -g 1000 iobroker \
|
||||||
&& chown root:iobroker /usr/sbin/gosu \
|
&& chown root:iobroker /usr/sbin/gosu \
|
||||||
&& chmod +s /usr/sbin/gosu
|
&& chmod +s /usr/sbin/gosu \
|
||||||
|
# Clean up installation cache
|
||||||
|
&& apt-get autoclean -y \
|
||||||
|
&& apt-get autoremove \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /tmp/* /var/tmp/* \
|
||||||
|
&& rm -rf /root/.cache/* /root/.npm/* \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Setting up default ENVs
|
# Setting up default ENVs
|
||||||
ENV DEBIAN_FRONTEND="teletype" \
|
ENV DEBIAN_FRONTEND="teletype" \
|
||||||
|
|||||||
56
debian/node14/Dockerfile
vendored
56
debian/node14/Dockerfile
vendored
@@ -14,39 +14,42 @@ ENV DEBIAN_FRONTEND noninteractive
|
|||||||
|
|
||||||
# Install prerequisites (including node) and generating locales
|
# Install prerequisites (including node) and generating locales
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
|
apt-utils \
|
||||||
|
cifs-utils \
|
||||||
curl \
|
curl \
|
||||||
gosu \
|
gosu \
|
||||||
|
iputils-ping \
|
||||||
jq \
|
jq \
|
||||||
locales \
|
locales \
|
||||||
|
nfs-common \
|
||||||
procps \
|
procps \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
sudo \
|
sudo \
|
||||||
|
tar \
|
||||||
|
tzdata \
|
||||||
udev \
|
udev \
|
||||||
wget \
|
wget \
|
||||||
# Generating locales
|
|
||||||
&& sed -i 's/^# *\(de_DE.UTF-8\)/\1/' /etc/locale.gen \
|
|
||||||
&& sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \
|
|
||||||
&& locale-gen \
|
|
||||||
# Install node
|
# Install node
|
||||||
&& curl -sL https://deb.nodesource.com/setup_14.x | bash \
|
&& curl -sL https://deb.nodesource.com/setup_14.x | bash \
|
||||||
&& apt-get update && apt-get install -y nodejs \
|
&& apt-get update && apt-get install -y nodejs \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
# Install node-gyp
|
||||||
|
&& npm install -g node-gyp \
|
||||||
|
# Generating locales
|
||||||
|
&& sed -i 's/^# *\(de_DE.UTF-8\)/\1/' /etc/locale.gen \
|
||||||
|
&& sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \
|
||||||
|
&& locale-gen
|
||||||
|
|
||||||
# Create scripts directorys and copy scripts
|
# Create directorys and copy scripts
|
||||||
RUN mkdir -p /opt/scripts/ \
|
COPY scripts /opt/scripts
|
||||||
&& mkdir -p /opt/userscripts/ \
|
COPY userscripts /opt/userscripts
|
||||||
&& chmod 777 /opt/scripts/ \
|
RUN chmod 777 /opt/scripts/ \
|
||||||
&& chmod 777 /opt/userscripts/
|
&& chmod 777 /opt/userscripts/ \
|
||||||
WORKDIR /opt/scripts/
|
&& chmod +x /opt/scripts/*.sh \
|
||||||
COPY scripts/* ./
|
&& chmod +x /opt/userscripts/*.sh
|
||||||
RUN chmod +x *.sh
|
|
||||||
WORKDIR /opt/userscripts/
|
|
||||||
COPY userscripts/* ./
|
|
||||||
RUN chmod +x *.sh
|
|
||||||
|
|
||||||
# Install ioBroker
|
# Install ioBroker
|
||||||
WORKDIR /
|
RUN curl -sL https://iobroker.net/install.sh | bash - \
|
||||||
RUN apt-get update \
|
|
||||||
&& curl -sL https://iobroker.net/install.sh | bash - \
|
|
||||||
&& mkdir -p /opt/scripts/.docker_config/ \
|
&& mkdir -p /opt/scripts/.docker_config/ \
|
||||||
&& echo "starting" > /opt/scripts/.docker_config/.healthcheck \
|
&& echo "starting" > /opt/scripts/.docker_config/.healthcheck \
|
||||||
&& echo "${VERSION}" > /opt/scripts/.docker_config/.thisisdocker \
|
&& echo "${VERSION}" > /opt/scripts/.docker_config/.thisisdocker \
|
||||||
@@ -56,15 +59,20 @@ RUN apt-get update \
|
|||||||
# Backup initial ioBroker and userscript folder
|
# Backup initial ioBroker and userscript folder
|
||||||
&& tar -cf /opt/initial_iobroker.tar /opt/iobroker \
|
&& tar -cf /opt/initial_iobroker.tar /opt/iobroker \
|
||||||
&& tar -cf /opt/initial_userscripts.tar /opt/userscripts \
|
&& tar -cf /opt/initial_userscripts.tar /opt/userscripts \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
# Setting up iobroker-user (shell, home dir and rights)
|
||||||
|
&& chsh -s /bin/bash iobroker \
|
||||||
# Setting up iobroker-user (shell, home dir and rights)
|
|
||||||
RUN chsh -s /bin/bash iobroker \
|
|
||||||
&& usermod --home /opt/iobroker iobroker \
|
&& usermod --home /opt/iobroker iobroker \
|
||||||
&& usermod -u 1000 iobroker \
|
&& usermod -u 1000 iobroker \
|
||||||
&& groupmod -g 1000 iobroker \
|
&& groupmod -g 1000 iobroker \
|
||||||
&& chown root:iobroker /usr/sbin/gosu \
|
&& chown root:iobroker /usr/sbin/gosu \
|
||||||
&& chmod +s /usr/sbin/gosu
|
&& chmod +s /usr/sbin/gosu \
|
||||||
|
# Clean up installation cache
|
||||||
|
&& apt-get autoclean -y \
|
||||||
|
&& apt-get autoremove \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /tmp/* /var/tmp/* \
|
||||||
|
&& rm -rf /root/.cache/* /root/.npm/* \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Setting up default ENVs
|
# Setting up default ENVs
|
||||||
ENV DEBIAN_FRONTEND="teletype" \
|
ENV DEBIAN_FRONTEND="teletype" \
|
||||||
|
|||||||
97
debian/node16/Dockerfile
vendored
Normal file
97
debian/node16/Dockerfile
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.title="Official ioBroker Docker Image" \
|
||||||
|
org.opencontainers.image.description="Officical Docker image for ioBroker smarthome software (https://www.iobroker.net)" \
|
||||||
|
org.opencontainers.image.documentation="https://github.com/buanet/ioBroker.docker#readme" \
|
||||||
|
org.opencontainers.image.authors="André Germann <info@buanet.de>" \
|
||||||
|
org.opencontainers.image.url="https://github.com/buanet/ioBroker.docker" \
|
||||||
|
org.opencontainers.image.source="https://github.com/buanet/ioBroker.docker" \
|
||||||
|
org.opencontainers.image.base.name="docker.io/library/debian:bullseye-slim" \
|
||||||
|
org.opencontainers.image.version="${VERSION}" \
|
||||||
|
org.opencontainers.image.created="${DATI}"
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
# Install prerequisites (including node) and generating locales
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
apt-utils \
|
||||||
|
cifs-utils \
|
||||||
|
curl \
|
||||||
|
gosu \
|
||||||
|
iputils-ping \
|
||||||
|
jq \
|
||||||
|
locales \
|
||||||
|
nfs-common \
|
||||||
|
procps \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
sudo \
|
||||||
|
tar \
|
||||||
|
tzdata \
|
||||||
|
udev \
|
||||||
|
wget \
|
||||||
|
# Install node
|
||||||
|
&& curl -sL https://deb.nodesource.com/setup_16.x | bash \
|
||||||
|
&& apt-get update && apt-get install -y nodejs \
|
||||||
|
# Install node-gyp
|
||||||
|
&& npm install -g node-gyp \
|
||||||
|
# Generating locales
|
||||||
|
&& sed -i 's/^# *\(de_DE.UTF-8\)/\1/' /etc/locale.gen \
|
||||||
|
&& sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \
|
||||||
|
&& locale-gen
|
||||||
|
|
||||||
|
# Create directorys and copy scripts
|
||||||
|
COPY scripts /opt/scripts
|
||||||
|
COPY userscripts /opt/userscripts
|
||||||
|
RUN chmod 777 /opt/scripts/ \
|
||||||
|
&& chmod 777 /opt/userscripts/ \
|
||||||
|
&& chmod +x /opt/scripts/*.sh \
|
||||||
|
&& chmod +x /opt/userscripts/*.sh
|
||||||
|
|
||||||
|
# Install ioBroker
|
||||||
|
RUN curl -sL https://iobroker.net/install.sh | bash - \
|
||||||
|
&& mkdir -p /opt/scripts/.docker_config/ \
|
||||||
|
&& echo "starting" > /opt/scripts/.docker_config/.healthcheck \
|
||||||
|
&& echo "${VERSION}" > /opt/scripts/.docker_config/.thisisdocker \
|
||||||
|
&& echo $(hostname) > /opt/.firstrun \
|
||||||
|
# Deleting UUID from build
|
||||||
|
&& iobroker unsetup -y \
|
||||||
|
# Backup initial ioBroker and userscript folder
|
||||||
|
&& tar -cf /opt/initial_iobroker.tar /opt/iobroker \
|
||||||
|
&& tar -cf /opt/initial_userscripts.tar /opt/userscripts \
|
||||||
|
# Setting up iobroker-user (shell, home dir and rights)
|
||||||
|
&& chsh -s /bin/bash iobroker \
|
||||||
|
&& usermod --home /opt/iobroker iobroker \
|
||||||
|
&& usermod -u 1000 iobroker \
|
||||||
|
&& groupmod -g 1000 iobroker \
|
||||||
|
&& chown root:iobroker /usr/sbin/gosu \
|
||||||
|
&& chmod +s /usr/sbin/gosu \
|
||||||
|
# Clean up installation cache
|
||||||
|
&& apt-get autoclean -y \
|
||||||
|
&& apt-get autoremove \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /tmp/* /var/tmp/* \
|
||||||
|
&& rm -rf /root/.cache/* /root/.npm/* \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Setting up default ENVs
|
||||||
|
ENV DEBIAN_FRONTEND="teletype" \
|
||||||
|
LANG="de_DE.UTF-8" \
|
||||||
|
LANGUAGE="de_DE:de" \
|
||||||
|
LC_ALL="de_DE.UTF-8" \
|
||||||
|
SETGID=1000 \
|
||||||
|
SETUID=1000 \
|
||||||
|
TZ="Europe/Berlin"
|
||||||
|
|
||||||
|
# Expose default admin ui port
|
||||||
|
EXPOSE 8081
|
||||||
|
|
||||||
|
# Change work dir
|
||||||
|
WORKDIR /opt/iobroker/
|
||||||
|
|
||||||
|
# Healthcheck
|
||||||
|
HEALTHCHECK --interval=15s --timeout=5s --retries=5 \
|
||||||
|
CMD ["/bin/bash", "-c", "/opt/scripts/healthcheck.sh"]
|
||||||
|
|
||||||
|
# Run startup-script
|
||||||
|
ENTRYPOINT ["/bin/bash", "-c", "/opt/scripts/iobroker_startup.sh"]
|
||||||
138
debian/scripts/iobroker_startup.sh
vendored
138
debian/scripts/iobroker_startup.sh
vendored
@@ -39,6 +39,7 @@ echo "----- Debugging information
|
|||||||
echo "----- -----"
|
echo "----- -----"
|
||||||
echo "----- System -----"
|
echo "----- System -----"
|
||||||
echo -n "----- " && echo -n "$(printf "%-20s %-28s" arch: $(uname -m))" && echo " -----"
|
echo -n "----- " && echo -n "$(printf "%-20s %-28s" arch: $(uname -m))" && echo " -----"
|
||||||
|
echo -n "----- " && echo -n "$(printf "%-20s %-28s" hostname: $(hostname))" && echo " -----"
|
||||||
echo "----- -----"
|
echo "----- -----"
|
||||||
echo "----- Docker-Image -----"
|
echo "----- Docker-Image -----"
|
||||||
echo -n "----- " && echo -n "$(printf "%-20s %-28s" image: ${VERSION})" && echo " -----"
|
echo -n "----- " && echo -n "$(printf "%-20s %-28s" image: ${VERSION})" && echo " -----"
|
||||||
@@ -86,14 +87,15 @@ then
|
|||||||
echo "Registering maintenance script as command..."
|
echo "Registering maintenance script as command..."
|
||||||
echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
|
echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
|
||||||
echo "alias maint=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
|
echo "alias maint=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
|
||||||
|
echo "alias m=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo ' '
|
echo ' '
|
||||||
fi
|
fi
|
||||||
if [ "$packages" != "" ]
|
if [ "$packages" != "" ]
|
||||||
then
|
then
|
||||||
echo "Installing additional packages is set by ENV."
|
echo "Installing additional packages is set by ENV."
|
||||||
echo "The following packages will be installed:" $packages"..."
|
echo "Checking the following Packages:" $packages"..."
|
||||||
echo $packages > /opt/scripts/.packages
|
echo $packages > /opt/scripts/.docker_config/.packages
|
||||||
bash /opt/scripts/setup_packages.sh -install
|
bash /opt/scripts/setup_packages.sh -install
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo ' '
|
echo ' '
|
||||||
@@ -139,7 +141,7 @@ then
|
|||||||
then
|
then
|
||||||
echo "IoBroker backup file detected in /opt/iobroker. But Multihost is set to \"slave\"."
|
echo "IoBroker backup file detected in /opt/iobroker. But Multihost is set to \"slave\"."
|
||||||
echo "Restoring a backup is not supported on Multihost slaves. Please check configuration and start over."
|
echo "Restoring a backup is not supported on Multihost slaves. Please check configuration and start over."
|
||||||
echo "For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker)."
|
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "IoBroker backup file detected in /opt/iobroker."
|
echo "IoBroker backup file detected in /opt/iobroker."
|
||||||
@@ -196,7 +198,7 @@ echo "Done."
|
|||||||
echo ' '
|
echo ' '
|
||||||
|
|
||||||
# checking hostname in ioBroker to match container hostname
|
# checking hostname in ioBroker to match container hostname
|
||||||
if [ $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*') != $(hostname) ]
|
if [ $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<="host": ")[^"]*') != $(hostname) ] && [ "$multihost" != "slave" ]
|
||||||
then
|
then
|
||||||
echo "Hostname in ioBroker does not match the hostname of this container."
|
echo "Hostname in ioBroker does not match the hostname of this container."
|
||||||
echo "Updating hostname to " $(hostname)"..."
|
echo "Updating hostname to " $(hostname)"..."
|
||||||
@@ -215,7 +217,7 @@ echo "$(printf -- '-%.0s' {1..80})"
|
|||||||
echo ' '
|
echo ' '
|
||||||
|
|
||||||
echo "Some adapters have special requirements/ settings which can be activated by the use of environment variables."
|
echo "Some adapters have special requirements/ settings which can be activated by the use of environment variables."
|
||||||
echo "For more information take a look at readme.md on Github!"
|
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)."
|
||||||
echo ' '
|
echo ' '
|
||||||
|
|
||||||
|
|
||||||
@@ -281,161 +283,164 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Checking ENV for multihost setup
|
# Checking ENV for multihost setup
|
||||||
# Configuring objects db host
|
if [ "$multihost" != "" ]
|
||||||
if [ "$multihost" = "master" ] && [ "$objectsdbtype" = "" ] && [ "$objectsdbhost" = "" ] && [ "$objectsdbport" = "" ]
|
|
||||||
then
|
then
|
||||||
|
echo "Checking Multihost Setup..."
|
||||||
|
echo ' '
|
||||||
|
# Configuring objects db host
|
||||||
|
if [ "$multihost" = "master" ] && [ "$objectsdbtype" = "" ] && [ "$objectsdbhost" = "" ] && [ "$objectsdbport" = "" ]
|
||||||
|
then
|
||||||
echo "Multihost is set as \"master\" by ENV and no external objects db is set."
|
echo "Multihost is set as \"master\" by ENV and no external objects db is set."
|
||||||
echo "Setting host of objects db to \"0.0.0.0\" to allow external communication..."
|
echo "Setting host of objects db to \"0.0.0.0\" to allow external communication..."
|
||||||
jq --arg objectsdbhost "0.0.0.0" '.objects.host = $objectsdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
jq --arg objectsdbhost "0.0.0.0" '.objects.host = $objectsdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
||||||
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo ' '
|
elif [ "$multihost" = "master" ] && [ "$objectsdbhost" = "127.0.0.1" ]
|
||||||
elif [ "$multihost" = "master" ] && [ "$objectsdbhost" = "127.0.0.1" ]
|
then
|
||||||
then
|
|
||||||
echo "Multihost is set as \"master\" by ENV. But objects db host is set to \"127.0.0.1\" by ENV too."
|
echo "Multihost is set as \"master\" by ENV. But objects db host is set to \"127.0.0.1\" by ENV too."
|
||||||
echo "This configuration will not work! Please change or remove ENV \"IOB_OBJECTSDB_HOST\" and start over!"
|
echo "This configuration will not allow slaves to connect the objects db! Please change or remove ENV \"IOB_OBJECTSDB_HOST\" and start over!"
|
||||||
echo "For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker)."
|
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)."
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$multihost" = "master" ] && [ "$objectsdbtype" != "" ] && [ "$objectsdbhost" != "" ] && [ "$objectsdbport" != "" ]
|
elif [ "$multihost" = "master" ] && [ "$objectsdbtype" != "" ] && [ "$objectsdbhost" != "" ] && [ "$objectsdbport" != "" ]
|
||||||
then
|
then
|
||||||
echo "Multihost is set as \"master\" by ENV and external objects db is set."
|
echo "Multihost is set as \"master\" by ENV and external objects db is set."
|
||||||
echo "Skipping this step..."
|
elif ([ "$multihost" = "slave" ] && [ "$objectsdbtype" = "" ]) || ([ "$multihost" = "slave" ] && [ "$objectsdbhost" = "" ]) || ([ "$multihost" = "slave" ] && [ "$objectsdbport" = "" ])
|
||||||
echo "Done."
|
then
|
||||||
echo ' '
|
|
||||||
elif ([ "$multihost" = "slave" ] && [ "$objectsdbtype" = "" ]) || ([ "$multihost" = "slave" ] && [ "$objectsdbhost" = "" ]) || ([ "$multihost" = "slave" ] && [ "$objectsdbport" = "" ])
|
|
||||||
then
|
|
||||||
echo "Multihost is set as \"slave\" by ENV. But no external objects db is set."
|
echo "Multihost is set as \"slave\" by ENV. But no external objects db is set."
|
||||||
echo "You have to configure ENVs \"IOB_OBJECTSDB_TYPE\", \"IOB_OBJECTSDB_HOST\" and \"IOB_OBJECTSDB_PORT\" to connect to a maser objects db."
|
echo "You have to configure ENVs \"IOB_OBJECTSDB_TYPE\", \"IOB_OBJECTSDB_HOST\" and \"IOB_OBJECTSDB_PORT\" to connect to a maser objects db."
|
||||||
echo "Please check your settings and start over."
|
echo "Please check your settings and start over."
|
||||||
echo "For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker)."
|
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)."
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$multihost" = "slave" ] && [ "$objectsdbtype" != "" ] && [ "$objectsdbhost" != "" ] && [ "$objectsdbport" != "" ]
|
elif [ "$multihost" = "slave" ] && [ "$objectsdbtype" != "" ] && [ "$objectsdbhost" != "" ] && [ "$objectsdbport" != "" ]
|
||||||
then
|
then
|
||||||
echo "Multihost is set as \"slave\" by ENV and external objects db is set."
|
echo "Multihost is set as \"slave\" by ENV and external objects db is set."
|
||||||
echo "Skipping this step..."
|
elif [ "$multihost" != "" ]
|
||||||
echo "Done."
|
then
|
||||||
echo ' '
|
|
||||||
elif [ "$multihost" != "" ]
|
|
||||||
then
|
|
||||||
echo "Multihost is set but it seems like some configuration is missing."
|
echo "Multihost is set but it seems like some configuration is missing."
|
||||||
echo "Please checke if you have configured the ENVs \"MULTIHOST\", \"IOB_OBJECTSDB_TYPE\", \"IOB_OBJECTSDB_HOST\" and \"IOB_OBJECTSDB_PORT\" correctly and start over."
|
echo "Please checke if you have configured the ENVs \"MULTIHOST\", \"IOB_OBJECTSDB_TYPE\", \"IOB_OBJECTSDB_HOST\" and \"IOB_OBJECTSDB_PORT\" correctly and start over."
|
||||||
echo "For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker)."
|
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
#Configuring states db host
|
echo ' '
|
||||||
if [ "$multihost" = "master" ] && [ "$statesdbtype" = "" ] && [ "$statesdbhost" = "" ] && [ "$statesdbport" = "" ]
|
|
||||||
then
|
#Configuring states db host
|
||||||
|
if [ "$multihost" = "master" ] && [ "$statesdbtype" = "" ] && [ "$statesdbhost" = "" ] && [ "$statesdbport" = "" ]
|
||||||
|
then
|
||||||
echo "Multihost is set as \"master\" by ENV and no external states db is set."
|
echo "Multihost is set as \"master\" by ENV and no external states db is set."
|
||||||
echo "Setting host of states db to \"0.0.0.0\" to allow external communication..."
|
echo "Setting host of states db to \"0.0.0.0\" to allow external communication..."
|
||||||
jq --arg statesdbhost "0.0.0.0" '.states.host = $statesdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
jq --arg statesdbhost "0.0.0.0" '.states.host = $statesdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
||||||
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo ' '
|
elif [ "$multihost" = "master" ] && [ "$statesdbhost" = "127.0.0.1" ]
|
||||||
elif [ "$multihost" = "master" ] && [ "$statesdbhost" = "127.0.0.1" ]
|
then
|
||||||
then
|
|
||||||
echo "Multihost is set as \"master\" by ENV. But states db host is set to \"127.0.0.1\" by ENV too."
|
echo "Multihost is set as \"master\" by ENV. But states db host is set to \"127.0.0.1\" by ENV too."
|
||||||
echo "This configuration will not work! Please change or remove ENV \"IOB_STATESDB_HOST\" and start over!"
|
echo "This configuration will not work! Please change or remove ENV \"IOB_STATESDB_HOST\" and start over!"
|
||||||
echo "For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker)."
|
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)."
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$multihost" = "master" ] && [ "$statesdbtype" != "" ] && [ "$statesdbhost" != "" ] && [ "$statesdbport" != "" ]
|
elif [ "$multihost" = "master" ] && [ "$statesdbtype" != "" ] && [ "$statesdbhost" != "" ] && [ "$statesdbport" != "" ]
|
||||||
then
|
then
|
||||||
echo "Multihost is set as \"master\" by ENV and external states db is set."
|
echo "Multihost is set as \"master\" by ENV and external states db is set."
|
||||||
echo "Skipping this step..."
|
elif ([ "$multihost" = "slave" ] && [ "$statesdbtype" = "" ]) || ([ "$multihost" = "slave" ] && [ "$statesdbhost" = "" ]) || ([ "$multihost" = "slave" ] && [ "$statesdbport" = "" ])
|
||||||
echo "Done."
|
then
|
||||||
echo ' '
|
|
||||||
elif ([ "$multihost" = "slave" ] && [ "$statesdbtype" = "" ]) || ([ "$multihost" = "slave" ] && [ "$statesdbhost" = "" ]) || ([ "$multihost" = "slave" ] && [ "$statesdbport" = "" ])
|
|
||||||
then
|
|
||||||
echo "Multihost is set as \"slave\" by ENV. But no external states db is set."
|
echo "Multihost is set as \"slave\" by ENV. But no external states db is set."
|
||||||
echo "You have to configure ENVs \"IOB_STATESDB_TYPE\", \"IOB_STATESDB_HOST\" and \"IOB_STATESDB_PORT\" to connect to a maser states db."
|
echo "You have to configure ENVs \"IOB_STATESDB_TYPE\", \"IOB_STATESDB_HOST\" and \"IOB_STATESDB_PORT\" to connect to a maser states db."
|
||||||
echo "Please check your settings and start over."
|
echo "Please check your settings and start over."
|
||||||
echo "For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker)."
|
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)."
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$multihost" = "slave" ] && [ "$statesdbtype" != "" ] && [ "$statesdbhost" != "" ] && [ "$statesdbport" != "" ]
|
elif [ "$multihost" = "slave" ] && [ "$statesdbtype" != "" ] && [ "$statesdbhost" != "" ] && [ "$statesdbport" != "" ]
|
||||||
then
|
then
|
||||||
echo "Multihost is set as \"slave\" by ENV and external states db is set."
|
echo "Multihost is set as \"slave\" by ENV and external states db is set."
|
||||||
echo "Skipping this step..."
|
elif [ "$multihost" != "" ]
|
||||||
echo "Done."
|
then
|
||||||
echo ' '
|
|
||||||
elif [ "$multihost" != "" ]
|
|
||||||
then
|
|
||||||
echo "Multihost is set but it seems like some configuration is missing."
|
echo "Multihost is set but it seems like some configuration is missing."
|
||||||
echo "Please checke if you have configured the ENVs \"MULTIHOST\", \"IOB_STATESDB_TYPE\", \"IOB_STATESDB_HOST\" and \"IOB_STATESTDB_PORT\" correctly and start over."
|
echo "Please checke if you have configured the ENVs \"MULTIHOST\", \"IOB_STATESDB_TYPE\", \"IOB_STATESDB_HOST\" and \"IOB_STATESTDB_PORT\" correctly and start over."
|
||||||
echo "For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker)."
|
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)."
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
|
echo ' '
|
||||||
|
echo "Done."
|
||||||
|
echo ' '
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Checking ENVs for custom setup of objects db
|
# Checking ENVs for custom setup of objects db
|
||||||
if [ "$objectsdbtype" != "" ] || [ "$objectsdbhost" != "" ] || [ "$objectsdbport" != "" ]
|
if [ "$objectsdbtype" != "" ] || [ "$objectsdbhost" != "" ] || [ "$objectsdbport" != "" ]
|
||||||
then
|
then
|
||||||
|
echo "Checking custom settings for objects db..."
|
||||||
|
echo ' '
|
||||||
if [ "$objectsdbtype" != $(jq -r '.objects.type' /opt/iobroker/iobroker-data/iobroker.json) ]
|
if [ "$objectsdbtype" != $(jq -r '.objects.type' /opt/iobroker/iobroker-data/iobroker.json) ]
|
||||||
then
|
then
|
||||||
echo "ENV IOB_OBJECTSDB_TYPE is set and value is different from detected ioBroker installation."
|
echo "IOB_OBJECTSDB_TYPE is set and value is different from detected ioBroker installation."
|
||||||
echo "Setting type of objects db to \""$objectsdbtype"\"..."
|
echo "Setting type of objects db to \""$objectsdbtype"\"..."
|
||||||
jq --arg objectsdbtype "$objectsdbtype" '.objects.type = $objectsdbtype' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
jq --arg objectsdbtype "$objectsdbtype" '.objects.type = $objectsdbtype' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
||||||
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
||||||
echo "Done."
|
echo "Done."
|
||||||
else
|
else
|
||||||
echo "ENV IOB_OBJECTSDB_TYPE is set and value meets detected ioBroker installation. Nothing to do here."
|
echo "IOB_OBJECTSDB_TYPE is set and value meets detected ioBroker installation."
|
||||||
fi
|
fi
|
||||||
if [ "$objectsdbhost" != $(jq -r '.objects.host' /opt/iobroker/iobroker-data/iobroker.json) ]
|
if [ "$objectsdbhost" != $(jq -r '.objects.host' /opt/iobroker/iobroker-data/iobroker.json) ]
|
||||||
then
|
then
|
||||||
echo "ENV IOB_OBJECTSDB_HOST is set and value is different from detected ioBroker installation."
|
echo "IOB_OBJECTSDB_HOST is set and value is different from detected ioBroker installation."
|
||||||
echo "Setting host of objects db to \""$objectsdbhost"\"..."
|
echo "Setting host of objects db to \""$objectsdbhost"\"..."
|
||||||
jq --arg objectsdbhost "$objectsdbhost" '.objects.host = $objectsdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
jq --arg objectsdbhost "$objectsdbhost" '.objects.host = $objectsdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
||||||
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
||||||
echo "Done."
|
echo "Done."
|
||||||
else
|
else
|
||||||
echo "ENV IOB_OBJECTSDB_HOST is set and value meets detected ioBroker installation. Nothing to do here."
|
echo "IOB_OBJECTSDB_HOST is set and value meets detected ioBroker installation."
|
||||||
fi
|
fi
|
||||||
if [ "$objectsdbport" != $(jq -r '.objects.port' /opt/iobroker/iobroker-data/iobroker.json) ]
|
if [ "$objectsdbport" != $(jq -r '.objects.port' /opt/iobroker/iobroker-data/iobroker.json) ]
|
||||||
then
|
then
|
||||||
echo "ENV IOB_OBJECTSDB_PORT is set and value is different from detected ioBroker installation."
|
echo "IOB_OBJECTSDB_PORT is set and value is different from detected ioBroker installation."
|
||||||
echo "Setting port of objects db to \""$objectsdbport"\"..."
|
echo "Setting port of objects db to \""$objectsdbport"\"..."
|
||||||
jq --arg objectsdbport $objectsdbport '.objects.port = $objectsdbport' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
jq --arg objectsdbport $objectsdbport '.objects.port = $objectsdbport' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
||||||
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
||||||
echo "Done."
|
echo "Done."
|
||||||
else
|
else
|
||||||
echo "ENV IOB_OBJECTSDB_PORT is set and value meets detected ioBroker installation. Nothing to do here."
|
echo "IOB_OBJECTSDB_PORT is set and value meets detected ioBroker installation."
|
||||||
fi
|
fi
|
||||||
echo ' '
|
echo ' '
|
||||||
|
echo "Done."
|
||||||
|
echo ' '
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Checking ENVs for custom setup of states db#
|
# Checking ENVs for custom setup of states db#
|
||||||
if [ "$statesdbtype" != "" ] || [ "$statesdbhost" != "" ] || [ "$statesdbport" != "" ]
|
if [ "$statesdbtype" != "" ] || [ "$statesdbhost" != "" ] || [ "$statesdbport" != "" ]
|
||||||
then
|
then
|
||||||
|
echo "Checking custom settings for states db..."
|
||||||
|
echo ' '
|
||||||
if [ "$statesdbtype" != $(jq -r '.states.type' /opt/iobroker/iobroker-data/iobroker.json) ]
|
if [ "$statesdbtype" != $(jq -r '.states.type' /opt/iobroker/iobroker-data/iobroker.json) ]
|
||||||
then
|
then
|
||||||
echo "ENV IOB_STATESDB_TYPE is set and value is different from detected ioBroker installation."
|
echo "IOB_STATESDB_TYPE is set and value is different from detected ioBroker installation."
|
||||||
echo "Setting type of states db to \""$statesdbtype"\"..."
|
echo "Setting type of states db to \""$statesdbtype"\"..."
|
||||||
jq --arg statesdbtype "$statesdbtype" '.states.type = $statesdbtype' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
jq --arg statesdbtype "$statesdbtype" '.states.type = $statesdbtype' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
||||||
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
||||||
echo "Done."
|
echo "Done."
|
||||||
else
|
else
|
||||||
echo "ENV IOB_STATESDB_TYPE is set and value meets detected ioBroker installation. Nothing to do here."
|
echo "IOB_STATESDB_TYPE is set and value meets detected ioBroker installation."
|
||||||
fi
|
fi
|
||||||
if [ "$statesdbhost" != $(jq -r '.states.host' /opt/iobroker/iobroker-data/iobroker.json) ]
|
if [ "$statesdbhost" != $(jq -r '.states.host' /opt/iobroker/iobroker-data/iobroker.json) ]
|
||||||
then
|
then
|
||||||
echo "ENV IOB_STATESDB_HOST is set and value is different from detected ioBroker installation."
|
echo "IOB_STATESDB_HOST is set and value is different from detected ioBroker installation."
|
||||||
echo "Setting host of states db to \""$statesdbhost"\"..."
|
echo "Setting host of states db to \""$statesdbhost"\"..."
|
||||||
jq --arg statesdbhost "$statesdbhost" '.states.host = $statesdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
jq --arg statesdbhost "$statesdbhost" '.states.host = $statesdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
||||||
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
||||||
echo "Done."
|
echo "Done."
|
||||||
else
|
else
|
||||||
echo "ENV IOB_STATESDB_HOST is set and value meets detected ioBroker installation. Nothing to do here."
|
echo "IOB_STATESDB_HOST is set and value meets detected ioBroker installation."
|
||||||
fi
|
fi
|
||||||
if [ "$statesdbport" != $(jq -r '.states.port' /opt/iobroker/iobroker-data/iobroker.json) ]
|
if [ "$statesdbport" != $(jq -r '.states.port' /opt/iobroker/iobroker-data/iobroker.json) ]
|
||||||
then
|
then
|
||||||
echo "ENV IOB_STATESDB_PORT is set and value is different from detected ioBroker installation."
|
echo "IOB_STATESDB_PORT is set and value is different from detected ioBroker installation."
|
||||||
echo "Setting port of states db to \""$statesdbport"\"..."
|
echo "Setting port of states db to \""$statesdbport"\"..."
|
||||||
jq --arg statesdbport $statesdbport '.states.port = $statesdbport' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
jq --arg statesdbport $statesdbport '.states.port = $statesdbport' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json
|
||||||
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json
|
||||||
echo "Done."
|
echo "Done."
|
||||||
else
|
else
|
||||||
echo "ENV IOB_STATESDB_PORT is set and value meets detected ioBroker installation. Nothing to do here."
|
echo "IOB_STATESDB_PORT is set and value meets detected ioBroker installation."
|
||||||
fi
|
fi
|
||||||
echo ' '
|
echo ' '
|
||||||
|
echo "Done."
|
||||||
|
echo ' '
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -493,8 +498,7 @@ shut_down() {
|
|||||||
echo ' '
|
echo ' '
|
||||||
echo "Recived termination signal (SIGTERM)."
|
echo "Recived termination signal (SIGTERM)."
|
||||||
echo "Shutting down ioBroker..."
|
echo "Shutting down ioBroker..."
|
||||||
pid=$(ps -ef | awk '/[j]s.controller/{print $2}')
|
pkill -SIGTERM -u iobroker -f iobroker.js-controller
|
||||||
kill -SIGTERM "$pid"
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
43
debian/scripts/maintenance.sh
vendored
43
debian/scripts/maintenance.sh
vendored
@@ -17,13 +17,14 @@ display_help() {
|
|||||||
echo ''
|
echo ''
|
||||||
echo "Usage: maintenance [ COMMAND ] [ OPTION ]"
|
echo "Usage: maintenance [ COMMAND ] [ OPTION ]"
|
||||||
echo " maint [ COMMAND ] [ OPTION ]"
|
echo " maint [ COMMAND ] [ OPTION ]"
|
||||||
|
echo " m [ COMMAND ] [ OPTION ]"
|
||||||
echo ''
|
echo ''
|
||||||
echo "COMMANDS"
|
echo "COMMANDS"
|
||||||
echo "------------------"
|
echo "------------------"
|
||||||
echo " status > gives the current state of maintenance mode"
|
echo " status > reports the current state of maintenance mode"
|
||||||
echo " on > switches mantenance mode ON"
|
echo " on > switches mantenance mode ON"
|
||||||
echo " off > switches mantenance mode OFF and shuts down/ restarts container"
|
echo " off > switches mantenance mode OFF and shuts down or restarts container"
|
||||||
echo " upgrade > will put container to maintenance mode and upgrade iobroker"
|
echo " upgrade > will put container to maintenance mode and upgrade ioBroker"
|
||||||
echo " help > shows this help"
|
echo " help > shows this help"
|
||||||
echo ''
|
echo ''
|
||||||
echo "OPTIONS"
|
echo "OPTIONS"
|
||||||
@@ -49,13 +50,13 @@ check_status() {
|
|||||||
switch_on() {
|
switch_on() {
|
||||||
if [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ] && [ "$killbyname" == "yes" ] # maintenance mode OFF / killbyname = yes / undocumented, only for use with backitup restore scripts
|
if [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ] && [ "$killbyname" == "yes" ] # maintenance mode OFF / killbyname = yes / undocumented, only for use with backitup restore scripts
|
||||||
then
|
then
|
||||||
echo 'This command will activate maintenance mode and stop all node processes.'
|
echo 'This command will activate maintenance mode and stop js-controller.'
|
||||||
echo 'Activating maintenance mode...'
|
echo 'Activating maintenance mode...'
|
||||||
echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
|
echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
|
||||||
sleep 1
|
sleep 1
|
||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
echo 'Stopping ioBroker...'
|
echo 'Stopping ioBroker...'
|
||||||
pkill node
|
pkill -u iobroker -f iobroker.js-controller
|
||||||
sleep 1
|
sleep 1
|
||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
exit 0
|
exit 0
|
||||||
@@ -100,11 +101,11 @@ switch_off() {
|
|||||||
if [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode ON / autoconfirm = no
|
if [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode ON / autoconfirm = no
|
||||||
then
|
then
|
||||||
echo 'You are now going to deactivate maintenance mode for this container.'
|
echo 'You are now going to deactivate maintenance mode for this container.'
|
||||||
echo 'Depending on the restart policy, your container will be stopped/ restarted immediately.'
|
echo 'Depending on the restart policy, your container will be stopped or restarted immediately.'
|
||||||
read -p 'Do you want to continue [yes/no]? ' A
|
read -p 'Do you want to continue [yes/no]? ' A
|
||||||
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
|
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
|
||||||
then
|
then
|
||||||
echo 'Deactivating maintenance mode and forcing container to stop/ restart...'
|
echo 'Deactivating maintenance mode and forcing container to stop or restart...'
|
||||||
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
|
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
|
||||||
pkill -u root
|
pkill -u root
|
||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
@@ -115,9 +116,9 @@ switch_off() {
|
|||||||
elif [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "yes" ] # maintenance mode ON / autoconfirm = yes
|
elif [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "yes" ] # maintenance mode ON / autoconfirm = yes
|
||||||
then
|
then
|
||||||
echo 'You are now going to deactivate maintenance mode for this container.'
|
echo 'You are now going to deactivate maintenance mode for this container.'
|
||||||
echo 'Depending on the restart policy, your container will be stopped/ restarted immediately.'
|
echo 'Depending on the restart policy, your container will be stopped or restarted immediately.'
|
||||||
echo 'This command was already confirmed by -y or --yes option.'
|
echo 'This command was already confirmed by -y or --yes option.'
|
||||||
echo 'Deactivating maintenance mode and forcing container to stop/ restart...'
|
echo 'Deactivating maintenance mode and forcing container to stop or restart...'
|
||||||
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
|
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
|
||||||
pkill -u root
|
pkill -u root
|
||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
@@ -132,9 +133,22 @@ upgrade() {
|
|||||||
echo 'You are now going to upgrade your js-controller.'
|
echo 'You are now going to upgrade your js-controller.'
|
||||||
echo 'As this will change data in /opt/iobroker, make sure you have a backup!'
|
echo 'As this will change data in /opt/iobroker, make sure you have a backup!'
|
||||||
echo 'During the upgrade process the container will automatically switch into maintenance mode and stop ioBroker.'
|
echo 'During the upgrade process the container will automatically switch into maintenance mode and stop ioBroker.'
|
||||||
echo 'Depending of the restart policy, you container will be stoped/ restarted automatically after the upgrade.'
|
echo 'Depending of the restart policy, your container will be stopped or restarted automatically after the upgrade.'
|
||||||
|
|
||||||
|
if [ "$autoconfirm" == "no" ]
|
||||||
|
then
|
||||||
read -p 'Do you want to continue [yes/no]? ' A
|
read -p 'Do you want to continue [yes/no]? ' A
|
||||||
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
|
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
|
||||||
|
then
|
||||||
|
: # Continue.
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
elif [ "$autoconfirm" == "yes" ]
|
||||||
|
then
|
||||||
|
echo 'This command was already confirmed by -y or --yes option.'
|
||||||
|
fi
|
||||||
|
if [ $(cat /opt/scripts/.docker_config/.healthcheck) != 'maintenance' ]
|
||||||
then
|
then
|
||||||
echo 'Activating maintenance mode...'
|
echo 'Activating maintenance mode...'
|
||||||
echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
|
echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
|
||||||
@@ -142,21 +156,20 @@ upgrade() {
|
|||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
echo 'Stopping ioBroker...'
|
echo 'Stopping ioBroker...'
|
||||||
pkill -u iobroker
|
pkill -u iobroker
|
||||||
sleep 1
|
sleep 5
|
||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
|
fi
|
||||||
echo 'Upgrading js-controller...'
|
echo 'Upgrading js-controller...'
|
||||||
iobroker update
|
iobroker update
|
||||||
|
sleep 1
|
||||||
iobroker upgrade self
|
iobroker upgrade self
|
||||||
sleep 1
|
sleep 1
|
||||||
echo 'Done.'
|
echo 'Done.'
|
||||||
echo 'Container will be stopped/ restarted in 5 seconds...'
|
echo 'Container will be stopped or restarted in 5 seconds...'
|
||||||
sleep 5
|
sleep 5
|
||||||
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
|
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
|
||||||
pkill -u root
|
pkill -u root
|
||||||
exit 0
|
exit 0
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
|||||||
17
debian/scripts/setup_packages.sh
vendored
17
debian/scripts/setup_packages.sh
vendored
@@ -3,9 +3,16 @@
|
|||||||
if [ $1 == "-install" ]
|
if [ $1 == "-install" ]
|
||||||
then
|
then
|
||||||
apt-get -qq update
|
apt-get -qq update
|
||||||
packages=$(cat /opt/scripts/.packages)
|
packages=$(cat /opt/scripts/.docker_config/.packages)
|
||||||
for i in $packages; do
|
for i in $packages; do
|
||||||
|
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ];
|
||||||
|
then
|
||||||
|
echo "$i is not installed. Installing..."
|
||||||
sudo apt-get -qq -y install $i
|
sudo apt-get -qq -y install $i
|
||||||
|
echo "Done."
|
||||||
|
else
|
||||||
|
echo "$i is already installed."
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
elif [ $1 == "-update" ]
|
elif [ $1 == "-update" ]
|
||||||
then
|
then
|
||||||
@@ -16,7 +23,13 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
apt-get autoclean -y
|
||||||
|
apt-get autoremove
|
||||||
|
apt-get clean
|
||||||
|
rm -rf /tmp/* /var/tmp/*
|
||||||
|
rm -rf /root/.cache/*
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
rm -f /opt/scripts/.packages
|
rm -f /opt/scripts/.docker_config/.packages
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
<img src="https://github.com/buanet/ioBroker.docker/raw/main/src/img/iobroker_logo.png" width="600" title="ioBroker Logo">
|
<img src="https://github.com/buanet/ioBroker.docker/raw/main/docs/img/iobroker_logo.png" width="600" title="ioBroker Logo">
|
||||||
|
|
||||||
[](https://hub.docker.com/repository/docker/buanet/iobroker)
|
[](https://hub.docker.com/r/buanet/iobroker)
|
||||||
[](https://hub.docker.com/repository/docker/buanet/iobroker)
|
[](https://hub.docker.com/r/buanet/iobroker)
|
||||||
[](https://hub.docker.com/repository/docker/buanet/iobroker)<br>
|
[](https://hub.docker.com/r/buanet/iobroker)<br>
|
||||||
[)](https://github.com/buanet/docker.watchdog/actions/workflows/docker_build_main_image.yml)
|
[)](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml)
|
||||||
[](https://github.com/buanet/ioBroker.docker/releases)
|
[](https://github.com/buanet/ioBroker.docker/releases)
|
||||||
[](https://github.com/buanet/ioBroker.docker/issues)<br>
|
[](https://github.com/buanet/ioBroker.docker/issues)<br>
|
||||||
[](https://github.com/buanet/ioBroker.docker)
|
[](https://github.com/buanet/ioBroker.docker)
|
||||||
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
|
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
|
||||||
[](https://paypal.me/buanet)
|
[](https://paypal.me/buanet)
|
||||||
|
|
||||||
**Note:** New major versions (e.g. v4, v5, v6) of the image always come with a new major verson of node (preinstalled). To avoid issues when upgrading into a new major version the best practice recommendation is to migrate using backup and restore procedure. For more details please see "Best Practices" section on official [readme.md](https://github.com/buanet/ioBroker.docker#best-practices).
|
# Important note
|
||||||
|
|
||||||
|
New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance).
|
||||||
|
|
||||||
# Quick reference
|
# Quick reference
|
||||||
|
|
||||||
@@ -20,17 +22,23 @@
|
|||||||
* Supported architectures: amd64, arm32v7, arm64v8
|
* Supported architectures: amd64, arm32v7, arm64v8
|
||||||
* Changelog: [Github Repository Changelog](https://github.com/buanet/ioBroker.docker/blob/main/CHANGELOG.md)
|
* Changelog: [Github Repository Changelog](https://github.com/buanet/ioBroker.docker/blob/main/CHANGELOG.md)
|
||||||
* Source code: [Github Repository](https://github.com/buanet/ioBroker.docker)
|
* Source code: [Github Repository](https://github.com/buanet/ioBroker.docker)
|
||||||
* All other questions should be answered here: [Github Repository Readme](https://github.com/buanet/ioBroker.docker#readme) or [iobroker.net](https://www.iobroker.net/)
|
* All other questions should be answered here: [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/) or [iobroker.net](https://www.iobroker.net/)
|
||||||
|
|
||||||
# Supported tags
|
# Supported tags
|
||||||
|
|
||||||
* `v5.2.0`, `v5.2.0-amd64`, `v5.2.0-arm32v7`, `v5.2.0-arm64v8`, `latest-v5`, `latest`
|
It is highly recommended not to use the `latest` tag for production, especially when using any kind of automated update procedure like watchtower. Please use the `latest-vX` tag instead.
|
||||||
* `v5.2.0-node14`, `v5.2.0-node14-amd64`, `v5.2.0-node14-arm32v7`, `v5.2.0-node14-arm64v8`, `latest-v5-node14`, `latest-node14`
|
|
||||||
* `v5.1.0`, `v5.2.0-amd64`, `v5.2.0-armv7hf`, `v5.2.0-aarch64`
|
### Node 14 versions
|
||||||
|
* [`v6.0.0`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`latest-v6`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`latest`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile)
|
||||||
|
|
||||||
|
### Node 12 versions
|
||||||
|
* [`v5.2.0`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`latest-v5`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile)
|
||||||
|
* [`v5.1.0`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/amd64/Dockerfile), [`v5.1.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/amd64/Dockerfile), [`v5.1.0-armv7hf`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/armv7hf/Dockerfile), [`v5.1.0-aarch64`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/aarch64/Dockerfile)
|
||||||
|
* [`v5.0.0`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/amd64/Dockerfile), [`v5.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/amd64/Dockerfile), [`v5.0.0-armv7hf`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/armv7hf/Dockerfile), [`v5.0.0-aarch64`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/aarch64/Dockerfile)
|
||||||
|
|
||||||
# What is ioBroker?
|
# What is ioBroker?
|
||||||
|
|
||||||
IoBroker is a open source IoT platform written in JavaScript that easily connects smarthome componets from different manufactures. With the help of plugins (called: "adapters") ioBroker is able to communicate with a big variety of IoT hardware and services using different protocols and APIs.<br>
|
IoBroker is a open source IoT platform written in JavaScript that easily connects smarthome components from different manufactures. With the help of plugins (called: "adapters") ioBroker is able to communicate with a big variety of IoT hardware and services using different protocols and APIs.<br>
|
||||||
All data is stored in a central database that all adapters can access. With this it is very easy to build up logical connections, automation scripts and beautiful visualisations.<br>
|
All data is stored in a central database that all adapters can access. With this it is very easy to build up logical connections, automation scripts and beautiful visualisations.<br>
|
||||||
For further details please check out [iobroker.net](https://www.iobroker.net).
|
For further details please check out [iobroker.net](https://www.iobroker.net).
|
||||||
|
|
||||||
@@ -41,7 +49,7 @@ For further details please check out [iobroker.net](https://www.iobroker.net).
|
|||||||
For taking a first look at iobroker on docker it would be enough to simply run the following basic docker run command:
|
For taking a first look at iobroker on docker it would be enough to simply run the following basic docker run command:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -p 8081:8081 --name iobroker -h iobroker iobroker/iobroker
|
docker run -p 8081:8081 --name iobroker -h iobroker buanet/iobroker
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running with docker-compose
|
## Running with docker-compose
|
||||||
@@ -54,7 +62,7 @@ version: '2'
|
|||||||
services:
|
services:
|
||||||
iobroker:
|
iobroker:
|
||||||
container_name: iobroker
|
container_name: iobroker
|
||||||
image: iobroker/iobroker
|
image: buanet/iobroker
|
||||||
hostname: iobroker
|
hostname: iobroker
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
@@ -85,7 +93,7 @@ You could use environment variables to auto configure your ioBroker container on
|
|||||||
* `IOB_MULTIHOST`(optional) Sets ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)
|
* `IOB_MULTIHOST`(optional) Sets ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)
|
||||||
* `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker objects db
|
* `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker objects db
|
||||||
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Sets port for ioBroker objects db
|
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Sets port for ioBroker objects db
|
||||||
* `IOB_OBJECTSDB_TYPE` (optional, default: file) Sets type of ioBroker objects db, cloud be "file" or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
|
* `IOB_OBJECTSDB_TYPE` (optional, default: file) Sets type of ioBroker objects db, could be "file" or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
|
||||||
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker states db
|
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker states db
|
||||||
* `IOB_STATESDB_PORT` (optional, default: 9000) Sets port for ioBroker states db
|
* `IOB_STATESDB_PORT` (optional, default: 9000) Sets port for ioBroker states db
|
||||||
* `IOB_STATESDB_TYPE` (optional, default: file) Sets type of ioBroker states db, could be "file" or "redis"
|
* `IOB_STATESDB_TYPE` (optional, default: file) Sets type of ioBroker states db, could be "file" or "redis"
|
||||||
@@ -100,17 +108,17 @@ You could use environment variables to auto configure your ioBroker container on
|
|||||||
* `LANG` (optional, default: de_DE.UTF‑8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
|
* `LANG` (optional, default: de_DE.UTF‑8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
|
||||||
* `LANGUAGE` (optional, default: de_DE:de) The following locales are pre-generated: de_DE:de, en_US:en
|
* `LANGUAGE` (optional, default: de_DE:de) The following locales are pre-generated: de_DE:de, en_US:en
|
||||||
* `LC_ALL` (optional, default: de_DE.UTF-8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
|
* `LC_ALL` (optional, default: de_DE.UTF-8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
|
||||||
* `PACKAGES` (optional) Installs additional linux packages to your container, packages should be seperated by whitespace like this: "package1 package2 package3".
|
* `PACKAGES` (optional) Installs additional linux packages to your container, packages should be separated by whitespace like this: "package1 package2 package3".
|
||||||
* `SETGID` (optional, default: 1000) In some cases it might be useful to specify the gid of the containers iobroker user to match an existing group on the docker host
|
* `SETGID` (optional, default: 1000) In some cases it might be useful to specify the gid of the containers iobroker user to match an existing group on the docker host
|
||||||
* `SETUID` (optional, default: 1000) In some cases it might be useful to specify the uid of the containers iobroker user to match an existing user on the docker host
|
* `SETUID` (optional, default: 1000) In some cases it might be useful to specify the uid of the containers iobroker user to match an existing user on the docker host
|
||||||
* `TZ` (optional, default: Europe/Berlin) Specifys the timeszone
|
* `TZ` (optional, default: Europe/Berlin) Specifies the time zone
|
||||||
* `USBDEVICES` (optional) Sets relevant permissions on mounted devices like "/dev/ttyACM0". For more than one device separate with ";".
|
* `USBDEVICES` (optional) Sets relevant permissions on mounted devices like "/dev/ttyACM0". For more than one device separate with ";".
|
||||||
|
|
||||||
## Notes about Docker networks
|
## Notes about Docker networks
|
||||||
|
|
||||||
The examples above are dealing with the Docker default bridge network. In general there are [some reasons](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge) why it might be the better choice to use a user-defined bridge network.
|
The examples above are dealing with the Docker default bridge network. In general there are [some reasons](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge) why it might be the better choice to use a user-defined bridge network.
|
||||||
|
|
||||||
Using a Docker bridge network works fine for taking a first look and with most of the ioBroker adapters (if you dont forget to redirect the ports your adapers use).<br>
|
Using a Docker bridge network works fine for taking a first look and with most of the ioBroker adapters (if you don't forget to redirect the ports your adapters use).<br>
|
||||||
But some ioBroker adapters are using techniques like [Multicast](https://en.wikipedia.org/wiki/Multicast) or [Broadcast](https://en.wikipedia.org/wiki/Broadcasting_(networking)) for automatic detection of IoT devices<br>
|
But some ioBroker adapters are using techniques like [Multicast](https://en.wikipedia.org/wiki/Multicast) or [Broadcast](https://en.wikipedia.org/wiki/Broadcasting_(networking)) for automatic detection of IoT devices<br>
|
||||||
In this case it may be useful to switch to [host](https://docs.docker.com/network/host/) or [MACVLAN](https://docs.docker.com/network/macvlan/) network.
|
In this case it may be useful to switch to [host](https://docs.docker.com/network/host/) or [MACVLAN](https://docs.docker.com/network/macvlan/) network.
|
||||||
|
|
||||||
@@ -1,15 +1,19 @@
|
|||||||
<img src="https://github.com/buanet/ioBroker.docker/raw/main/src/img/iobroker_logo.png" width="600" title="ioBroker Logo">
|
###### [iobroker/iobroker](https://hub.docker.com/r/iobroker/iobroker) is an alias for [buanet/iobroker](https://hub.docker.com/r/buanet/iobroker)
|
||||||
|
|
||||||
[](https://hub.docker.com/repository/docker/buanet/iobroker)
|
<img src="https://github.com/buanet/ioBroker.docker/raw/main/docs/img/iobroker_logo.png" width="600" title="ioBroker Logo">
|
||||||
[](https://hub.docker.com/repository/docker/buanet/iobroker)
|
|
||||||
[](https://hub.docker.com/repository/docker/buanet/iobroker)<br>
|
[](https://hub.docker.com/r/buanet/iobroker)
|
||||||
[)](https://github.com/buanet/docker.watchdog/actions/workflows/docker_build_main_image.yml)
|
[](https://hub.docker.com/r/buanet/iobroker)
|
||||||
|
[](https://hub.docker.com/r/buanet/iobroker)<br>
|
||||||
|
[)](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml)
|
||||||
[](https://github.com/buanet/ioBroker.docker/releases)
|
[](https://github.com/buanet/ioBroker.docker/releases)
|
||||||
[](https://github.com/buanet/ioBroker.docker/issues)<br>
|
[](https://github.com/buanet/ioBroker.docker/issues)<br>
|
||||||
[](https://github.com/buanet/ioBroker.docker)
|
[](https://github.com/buanet/ioBroker.docker)
|
||||||
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
|
[](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
|
||||||
|
|
||||||
**Note:** New major versions (e.g. v4, v5, v6) of the image always come with a new major verson of node (preinstalled). To avoid issues when upgrading into a new major version the best practice recommendation is to migrate using backup and restore procedure. For more details please see "Best Practices" section on official [readme.md](https://github.com/buanet/ioBroker.docker#best-practices).
|
# Important note
|
||||||
|
|
||||||
|
New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance).
|
||||||
|
|
||||||
# Quick reference
|
# Quick reference
|
||||||
|
|
||||||
@@ -19,17 +23,23 @@
|
|||||||
* Supported architectures: amd64, arm32v7, arm64v8
|
* Supported architectures: amd64, arm32v7, arm64v8
|
||||||
* Changelog: [Github Repository Changelog](https://github.com/buanet/ioBroker.docker/blob/main/CHANGELOG.md)
|
* Changelog: [Github Repository Changelog](https://github.com/buanet/ioBroker.docker/blob/main/CHANGELOG.md)
|
||||||
* Source code: [Github Repository](https://github.com/buanet/ioBroker.docker)
|
* Source code: [Github Repository](https://github.com/buanet/ioBroker.docker)
|
||||||
* All other questions should be answered here: [Github Repository Readme](https://github.com/buanet/ioBroker.docker#readme) or [iobroker.net](https://www.iobroker.net/)
|
* All other questions should be answered here: [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/) or [iobroker.net](https://www.iobroker.net/)
|
||||||
|
|
||||||
# Supported tags
|
# Supported tags
|
||||||
|
|
||||||
* `v5.2.0`, `v5.2.0-amd64`, `v5.2.0-arm32v7`, `v5.2.0-arm64v8`, `latest-v5`, `latest`
|
It is highly recommended not to use the `latest` tag for production, especially when using any kind of automated update procedure like watchtower. Please use the `latest-vX` tag instead.
|
||||||
* `v5.2.0-node14`, `v5.2.0-node14-amd64`, `v5.2.0-node14-arm32v7`, `v5.2.0-node14-arm64v8`, `latest-v5-node14`, `latest-node14`
|
|
||||||
* `v5.1.0`, `v5.2.0-amd64`, `v5.2.0-armv7hf`, `v5.2.0-aarch64`
|
### Node 14 versions
|
||||||
|
* [`v6.0.0`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`v6.0.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`latest-v6`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile), [`latest`](https://github.com/buanet/ioBroker.docker/blob/v6.0.0/debian/node14/Dockerfile)
|
||||||
|
|
||||||
|
### Node 12 versions
|
||||||
|
* [`v5.2.0`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-arm32v7`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`v5.2.0-arm64v8`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile), [`latest-v5`](https://github.com/buanet/ioBroker.docker/blob/v5.2.0/debian/node12/Dockerfile)
|
||||||
|
* [`v5.1.0`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/amd64/Dockerfile), [`v5.1.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/amd64/Dockerfile), [`v5.1.0-armv7hf`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/armv7hf/Dockerfile), [`v5.1.0-aarch64`](https://github.com/buanet/ioBroker.docker/blob/v5.1.0/aarch64/Dockerfile)
|
||||||
|
* [`v5.0.0`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/amd64/Dockerfile), [`v5.0.0-amd64`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/amd64/Dockerfile), [`v5.0.0-armv7hf`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/armv7hf/Dockerfile), [`v5.0.0-aarch64`](https://github.com/buanet/ioBroker.docker/blob/v5.0.0/aarch64/Dockerfile)
|
||||||
|
|
||||||
# What is ioBroker?
|
# What is ioBroker?
|
||||||
|
|
||||||
IoBroker is a open source IoT platform written in JavaScript that easily connects smarthome componets from different manufactures. With the help of plugins (called: "adapters") ioBroker is able to communicate with a big variety of IoT hardware and services using different protocols and APIs.<br>
|
IoBroker is a open source IoT platform written in JavaScript that easily connects smarthome components from different manufactures. With the help of plugins (called: "adapters") ioBroker is able to communicate with a big variety of IoT hardware and services using different protocols and APIs.<br>
|
||||||
All data is stored in a central database that all adapters can access. With this it is very easy to build up logical connections, automation scripts and beautiful visualisations.<br>
|
All data is stored in a central database that all adapters can access. With this it is very easy to build up logical connections, automation scripts and beautiful visualisations.<br>
|
||||||
For further details please check out [iobroker.net](https://www.iobroker.net).
|
For further details please check out [iobroker.net](https://www.iobroker.net).
|
||||||
|
|
||||||
@@ -40,7 +50,7 @@ For further details please check out [iobroker.net](https://www.iobroker.net).
|
|||||||
For taking a first look at iobroker on docker it would be enough to simply run the following basic docker run command:
|
For taking a first look at iobroker on docker it would be enough to simply run the following basic docker run command:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -p 8081:8081 --name iobroker -h iobroker iobroker/iobroker
|
docker run -p 8081:8081 --name iobroker -h iobroker buanet/iobroker
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running with docker-compose
|
## Running with docker-compose
|
||||||
@@ -53,7 +63,7 @@ version: '2'
|
|||||||
services:
|
services:
|
||||||
iobroker:
|
iobroker:
|
||||||
container_name: iobroker
|
container_name: iobroker
|
||||||
image: iobroker/iobroker
|
image: buanet/iobroker
|
||||||
hostname: iobroker
|
hostname: iobroker
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
@@ -84,7 +94,7 @@ You could use environment variables to auto configure your ioBroker container on
|
|||||||
* `IOB_MULTIHOST`(optional) Sets ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)
|
* `IOB_MULTIHOST`(optional) Sets ioBroker "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)
|
||||||
* `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker objects db
|
* `IOB_OBJECTSDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker objects db
|
||||||
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Sets port for ioBroker objects db
|
* `IOB_OBJECTSDB_PORT` (optional, default: 9001) Sets port for ioBroker objects db
|
||||||
* `IOB_OBJECTSDB_TYPE` (optional, default: file) Sets type of ioBroker objects db, cloud be "file" or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
|
* `IOB_OBJECTSDB_TYPE` (optional, default: file) Sets type of ioBroker objects db, could be "file" or "redis" ([not officially supported](https://github.com/ioBroker/ioBroker#databases)).
|
||||||
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker states db
|
* `IOB_STATESDB_HOST` (optional, default: 127.0.0.1) Sets host for ioBroker states db
|
||||||
* `IOB_STATESDB_PORT` (optional, default: 9000) Sets port for ioBroker states db
|
* `IOB_STATESDB_PORT` (optional, default: 9000) Sets port for ioBroker states db
|
||||||
* `IOB_STATESDB_TYPE` (optional, default: file) Sets type of ioBroker states db, could be "file" or "redis"
|
* `IOB_STATESDB_TYPE` (optional, default: file) Sets type of ioBroker states db, could be "file" or "redis"
|
||||||
@@ -92,24 +102,24 @@ You could use environment variables to auto configure your ioBroker container on
|
|||||||
### Activate special features:
|
### Activate special features:
|
||||||
|
|
||||||
* `AVAHI` (optional, default: false) Installs and activates avahi-daemon for supporting yahka-adapter, can be "true" or "false"
|
* `AVAHI` (optional, default: false) Installs and activates avahi-daemon for supporting yahka-adapter, can be "true" or "false"
|
||||||
* `AVAHI` (optional, default: false) Installs and activates avahi-daemon for supporting yahka-adapter, can be "true" or "false"
|
* `ZWAVE` (optional, default: false) Installs openzwave to support zwave-adapter, can be "true" or "false"
|
||||||
|
|
||||||
### Configure environment:
|
### Configure environment:
|
||||||
|
|
||||||
* `LANG` (optional, default: de_DE.UTF‑8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
|
* `LANG` (optional, default: de_DE.UTF‑8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
|
||||||
* `LANGUAGE` (optional, default: de_DE:de) The following locales are pre-generated: de_DE:de, en_US:en
|
* `LANGUAGE` (optional, default: de_DE:de) The following locales are pre-generated: de_DE:de, en_US:en
|
||||||
* `LC_ALL` (optional, default: de_DE.UTF-8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
|
* `LC_ALL` (optional, default: de_DE.UTF-8) The following locales are pre-generated: de_DE.UTF-8, en_US.UTF-8
|
||||||
* `PACKAGES` (optional) Installs additional linux packages to your container, packages should be seperated by whitespace like this: "package1 package2 package3".
|
* `PACKAGES` (optional) Installs additional linux packages to your container, packages should be separated by whitespace like this: "package1 package2 package3".
|
||||||
* `SETGID` (optional, default: 1000) In some cases it might be useful to specify the gid of the containers iobroker user to match an existing group on the docker host
|
* `SETGID` (optional, default: 1000) In some cases it might be useful to specify the gid of the containers iobroker user to match an existing group on the docker host
|
||||||
* `SETUID` (optional, default: 1000) In some cases it might be useful to specify the uid of the containers iobroker user to match an existing user on the docker host
|
* `SETUID` (optional, default: 1000) In some cases it might be useful to specify the uid of the containers iobroker user to match an existing user on the docker host
|
||||||
* `TZ` (optional, default: Europe/Berlin) Specifys the timeszone
|
* `TZ` (optional, default: Europe/Berlin) Specifies the time zone
|
||||||
* `USBDEVICES` (optional) Sets relevant permissions on mounted devices like "/dev/ttyACM0". For more than one device separate with ";".
|
* `USBDEVICES` (optional) Sets relevant permissions on mounted devices like "/dev/ttyACM0". For more than one device separate with ";".
|
||||||
|
|
||||||
## Notes about Docker networks
|
## Notes about Docker networks
|
||||||
|
|
||||||
The examples above are dealing with the Docker default bridge network. In general there are [some reasons](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge) why it might be the better choice to use a user-defined bridge network.
|
The examples above are dealing with the Docker default bridge network. In general there are [some reasons](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge) why it might be the better choice to use a user-defined bridge network.
|
||||||
|
|
||||||
Using a Docker bridge network works fine for taking a first look and with most of the ioBroker adapters (if you dont forget to redirect the ports your adapers use).<br>
|
Using a Docker bridge network works fine for taking a first look and with most of the ioBroker adapters (if you don't forget to redirect the ports your adapters use).<br>
|
||||||
But some ioBroker adapters are using techniques like [Multicast](https://en.wikipedia.org/wiki/Multicast) or [Broadcast](https://en.wikipedia.org/wiki/Broadcasting_(networking)) for automatic detection of IoT devices<br>
|
But some ioBroker adapters are using techniques like [Multicast](https://en.wikipedia.org/wiki/Multicast) or [Broadcast](https://en.wikipedia.org/wiki/Broadcasting_(networking)) for automatic detection of IoT devices<br>
|
||||||
In this case it may be useful to switch to [host](https://docs.docker.com/network/host/) or [MACVLAN](https://docs.docker.com/network/macvlan/) network.
|
In this case it may be useful to switch to [host](https://docs.docker.com/network/host/) or [MACVLAN](https://docs.docker.com/network/macvlan/) network.
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
BIN
docs/img/iobroker_logo_small.png
Normal file
BIN
docs/img/iobroker_logo_small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
BIN
docs/img/pp_logo.png
Normal file
BIN
docs/img/pp_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user