diff --git a/.azure/azp-template-python.yml b/.azure/azp-template-python.yml index 7a844ac..5e1bee6 100644 --- a/.azure/azp-template-python.yml +++ b/.azure/azp-template-python.yml @@ -14,7 +14,6 @@ jobs: pool: vmImage: 'ubuntu-16.04' strategy: - maxParallel: 3 matrix: amd64: buildArch: 'amd64' diff --git a/README.md b/README.md index ecdb739..316d5e6 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,17 @@ Using these images as a base for other Docker projects is, however, not recommen | amd64-base-ubuntu | Ubuntu | 14.04, 16.04, 18.04 | 18.04 | | i386-base-ubuntu | Ubuntu | 14.04, 16.04, 18.04 | 18.04 | +# Debian images + +**Note**: We prefer the alpine based version because it's more IoT friendly. In some case, you need a glibc system like this. + +| Image | OS | Tags | latest | +|-------|----|------|--------| +| armv7-base-debian | Debian | stretch buster | buster | +| aarch64-base-debian | Debain | stretch buster | buster | +| amd64-base-debian | Debain | stretch buster | buster | +| i386-base-debian | Debain | stretch buster | buster | + ## Raspbian images | Image | OS | Tags | latest | diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4f54241..1c9eecd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,7 +16,7 @@ variables: - name: versionHadolint value: 'v1.16.3' - name: versionBuilder - value: '5.0' + value: '6.0' - group: docker jobs: @@ -46,7 +46,6 @@ jobs: pool: vmImage: 'ubuntu-16.04' strategy: - maxParallel: 3 matrix: alpine36: buildVersion: '3.6' @@ -117,7 +116,6 @@ jobs: pool: vmImage: 'ubuntu-16.04' strategy: - maxParallel: 2 matrix: trusty: buildVersion: '14.04' @@ -153,7 +151,6 @@ jobs: pool: vmImage: 'ubuntu-16.04' strategy: - maxParallel: 2 matrix: jessie: buildVersion: 'jessie' @@ -175,3 +172,34 @@ jobs: -t /data/raspbian --docker-hub homeassistant $(buildLatest) \ --release $(Build.SourceBranchName) displayName: 'Build Ubuntu base-images' + + +- job: 'Debian' + condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags'), succeeded('Linter')) + dependsOn: 'Linter' + pool: + vmImage: 'ubuntu-16.04' + strategy: + matrix: + stretch: + buildVersion: 'stretch' + buildArch: '--amd64 --i386 --armv7 --aarch64' + buildLatest: '--no-latest' + buster: + buildVersion: 'buster' + buildArch: '--amd64 --i386 --armv7 --aarch64' + buildLatest: '' + steps: + - script: sudo docker login -u $(dockerUser) -p $(dockerPassword) + displayName: 'Docker hub login' + - script: sudo docker pull homeassistant/amd64-builder:$(versionBuilder) + displayName: 'Install Builder' + - script: | + sudo docker run --rm --privileged \ + -v ~/.docker:/root/.docker \ + -v /run/docker.sock:/run/docker.sock:rw -v $(pwd):/data:ro \ + homeassistant/amd64-builder:$(versionBuilder) \ + --base-debian $(buildVersion) $(buildArch) \ + -t /data/debian --docker-hub homeassistant $(buildLatest) \ + --release $(Build.SourceBranchName) + displayName: 'Build Ubuntu base-images' diff --git a/debian/aarch64/Dockerfile b/debian/aarch64/Dockerfile new file mode 100644 index 0000000..53f529f --- /dev/null +++ b/debian/aarch64/Dockerfile @@ -0,0 +1,27 @@ +ARG BUILD_VERSION +FROM arm64v8/debian:${BUILD_VERSION}-slim + +# QEMU for crossbuilds +COPY qemu-aarch64-static /usr/bin/qemu-aarch64-static + +# Default ENV +ENV LANG C.UTF-8 + +# Set shell +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# Base system +ARG BASHIO_VERSION=0.3.2 +RUN apt-get update && apt-get install -y --no-install-recommends \ + bash \ + jq \ + tzdata \ + curl \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + \ + && mkdir -p /tmp/bashio \ + && curl -L -s https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz | tar -xzf - --strip 1 -C /tmp/bashio \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -rf /tmp/bashio diff --git a/debian/aarch64/qemu-aarch64-static b/debian/aarch64/qemu-aarch64-static new file mode 100644 index 0000000..1478b19 Binary files /dev/null and b/debian/aarch64/qemu-aarch64-static differ diff --git a/debian/amd64/Dockerfile b/debian/amd64/Dockerfile new file mode 100644 index 0000000..b30744e --- /dev/null +++ b/debian/amd64/Dockerfile @@ -0,0 +1,24 @@ +ARG BUILD_VERSION +FROM debian:${BUILD_VERSION}-slim + +# Default ENV +ENV LANG C.UTF-8 + +# Set shell +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# Base system +ARG BASHIO_VERSION=0.3.2 +RUN apt-get update && apt-get install -y --no-install-recommends \ + bash \ + jq \ + tzdata \ + curl \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + \ + && mkdir -p /tmp/bashio \ + && curl -L -s https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz | tar -xzf - --strip 1 -C /tmp/bashio \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -rf /tmp/bashio diff --git a/debian/armv7/Dockerfile b/debian/armv7/Dockerfile new file mode 100644 index 0000000..067782f --- /dev/null +++ b/debian/armv7/Dockerfile @@ -0,0 +1,27 @@ +ARG BUILD_VERSION +FROM arm32v7/debian:${BUILD_VERSION}-slim + +# QEMU for crossbuilds +COPY qemu-arm-static /usr/bin/qemu-arm-static + +# Default ENV +ENV LANG C.UTF-8 + +# Set shell +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# Base system +ARG BASHIO_VERSION=0.3.2 +RUN apt-get update && apt-get install -y --no-install-recommends \ + bash \ + jq \ + tzdata \ + curl \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + \ + && mkdir -p /tmp/bashio \ + && curl -L -s https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz | tar -xzf - --strip 1 -C /tmp/bashio \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -rf /tmp/bashio diff --git a/debian/armv7/qemu-arm-static b/debian/armv7/qemu-arm-static new file mode 100644 index 0000000..efc0780 Binary files /dev/null and b/debian/armv7/qemu-arm-static differ diff --git a/debian/i386/Dockerfile b/debian/i386/Dockerfile new file mode 100644 index 0000000..bd1f904 --- /dev/null +++ b/debian/i386/Dockerfile @@ -0,0 +1,24 @@ +ARG BUILD_VERSION +FROM i386/debian:${BUILD_VERSION}-slim + +# Default ENV +ENV LANG C.UTF-8 + +# Set shell +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# Base system +ARG BASHIO_VERSION=0.3.2 +RUN apt-get update && apt-get install -y --no-install-recommends \ + bash \ + jq \ + tzdata \ + curl \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + \ + && mkdir -p /tmp/bashio \ + && curl -L -s https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz | tar -xzf - --strip 1 -C /tmp/bashio \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -rf /tmp/bashio