Skip to content

Commit

Permalink
Add debian support (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvizeli authored Aug 9, 2019
1 parent 233490b commit 8a20b8a
Show file tree
Hide file tree
Showing 9 changed files with 145 additions and 5 deletions.
1 change: 0 additions & 1 deletion .azure/azp-template-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
pool:
vmImage: 'ubuntu-16.04'
strategy:
maxParallel: 3
matrix:
amd64:
buildArch: 'amd64'
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
36 changes: 32 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variables:
- name: versionHadolint
value: 'v1.16.3'
- name: versionBuilder
value: '5.0'
value: '6.0'
- group: docker

jobs:
Expand Down Expand Up @@ -46,7 +46,6 @@ jobs:
pool:
vmImage: 'ubuntu-16.04'
strategy:
maxParallel: 3
matrix:
alpine36:
buildVersion: '3.6'
Expand Down Expand Up @@ -117,7 +116,6 @@ jobs:
pool:
vmImage: 'ubuntu-16.04'
strategy:
maxParallel: 2
matrix:
trusty:
buildVersion: '14.04'
Expand Down Expand Up @@ -153,7 +151,6 @@ jobs:
pool:
vmImage: 'ubuntu-16.04'
strategy:
maxParallel: 2
matrix:
jessie:
buildVersion: 'jessie'
Expand All @@ -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'
27 changes: 27 additions & 0 deletions debian/aarch64/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Binary file added debian/aarch64/qemu-aarch64-static
Binary file not shown.
24 changes: 24 additions & 0 deletions debian/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions debian/armv7/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Binary file added debian/armv7/qemu-arm-static
Binary file not shown.
24 changes: 24 additions & 0 deletions debian/i386/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8a20b8a

Please sign in to comment.