mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-04-19 14:47:15 +00:00

* Use skopeo to download container images Separate container download from image build. This will allow to share the downloaded images between multiple builds. We won't store the Supervisor container with the version tag, just with the latest tag. This allows to simplify the procedure a bit. It seems there is no downside to this approach. * Use official Docker in Docker images to build data partition Instead of building our own Debian based image let's use the official Docker in Docker image. This avoids building an image for the hassio data partition and speeds up build as well. This calls mount commands using sudo to mount the data partition as part of the buildroot build now. This is not much different from before as mount has been called as root inside the container, essentially equates to the same "isolation" level. * Use image digest as part of the file name The landing page has no version information in the tag. To avoid potentially source caching issues, use the digest as part of the file name.
60 lines
1.4 KiB
Docker
60 lines
1.4 KiB
Docker
FROM debian:bullseye
|
|
|
|
# Set shell
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
# Docker
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
apt-transport-https \
|
|
ca-certificates \
|
|
curl \
|
|
gpg-agent \
|
|
gpg \
|
|
dirmngr \
|
|
software-properties-common \
|
|
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
|
|
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
|
|
&& apt-get update && apt-get install -y --no-install-recommends \
|
|
docker-ce \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Build tools
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
bash \
|
|
bc \
|
|
binutils \
|
|
build-essential \
|
|
bzip2 \
|
|
cpio \
|
|
file \
|
|
git \
|
|
make \
|
|
ncurses-dev \
|
|
patch \
|
|
perl \
|
|
python3 \
|
|
python3-matplotlib \
|
|
python-is-python3 \
|
|
graphviz \
|
|
rsync \
|
|
sudo \
|
|
unzip \
|
|
zip \
|
|
wget \
|
|
qemu-utils \
|
|
openssh-client \
|
|
vim \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
skopeo \
|
|
jq \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Init entry
|
|
COPY scripts/entry.sh /usr/sbin/
|
|
ENTRYPOINT ["/usr/sbin/entry.sh"]
|
|
|
|
# Get buildroot
|
|
WORKDIR /build
|