mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 11:25:35 +00:00
[docker] Remove alpine base, build only on debian (#16991)
This commit is contained in:
7
.github/actions/build-image/action.yaml
vendored
7
.github/actions/build-image/action.yaml
vendored
@@ -15,11 +15,6 @@ inputs:
|
|||||||
description: "Version to build"
|
description: "Version to build"
|
||||||
required: true
|
required: true
|
||||||
example: "2023.12.0"
|
example: "2023.12.0"
|
||||||
base_os:
|
|
||||||
description: "Base OS to use"
|
|
||||||
required: false
|
|
||||||
default: "debian"
|
|
||||||
example: "debian"
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
@@ -60,7 +55,6 @@ runs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
BUILD_TYPE=${{ inputs.build_type }}
|
BUILD_TYPE=${{ inputs.build_type }}
|
||||||
BUILD_VERSION=${{ inputs.version }}
|
BUILD_VERSION=${{ inputs.version }}
|
||||||
BUILD_OS=${{ inputs.base_os }}
|
|
||||||
outputs: |
|
outputs: |
|
||||||
type=image,name=ghcr.io/${{ steps.tags.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true
|
type=image,name=ghcr.io/${{ steps.tags.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true
|
||||||
|
|
||||||
@@ -86,7 +80,6 @@ runs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
BUILD_TYPE=${{ inputs.build_type }}
|
BUILD_TYPE=${{ inputs.build_type }}
|
||||||
BUILD_VERSION=${{ inputs.version }}
|
BUILD_VERSION=${{ inputs.version }}
|
||||||
BUILD_OS=${{ inputs.base_os }}
|
|
||||||
outputs: |
|
outputs: |
|
||||||
type=image,name=docker.io/${{ steps.tags.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true
|
type=image,name=docker.io/${{ steps.tags.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
ARG BUILD_VERSION=dev
|
ARG BUILD_VERSION=dev
|
||||||
ARG BUILD_OS=alpine
|
|
||||||
ARG BUILD_BASE_VERSION=2025.04.0
|
ARG BUILD_BASE_VERSION=2025.04.0
|
||||||
ARG BUILD_TYPE=docker
|
ARG BUILD_TYPE=docker
|
||||||
|
|
||||||
FROM ghcr.io/esphome/docker-base:${BUILD_OS}-${BUILD_BASE_VERSION} AS base-source-docker
|
FROM ghcr.io/esphome/docker-base:debian-${BUILD_BASE_VERSION} AS base-source-docker
|
||||||
FROM ghcr.io/esphome/docker-base:${BUILD_OS}-ha-addon-${BUILD_BASE_VERSION} AS base-source-ha-addon
|
FROM ghcr.io/esphome/docker-base:debian-ha-addon-${BUILD_BASE_VERSION} AS base-source-ha-addon
|
||||||
|
|
||||||
ARG BUILD_TYPE
|
ARG BUILD_TYPE
|
||||||
FROM base-source-${BUILD_TYPE} AS base
|
FROM base-source-${BUILD_TYPE} AS base
|
||||||
@@ -18,13 +17,9 @@ RUN git config --system --add safe.directory "*" \
|
|||||||
# validate openocd-esp32 (it dynamically links libusb-1.0.so.0); without
|
# validate openocd-esp32 (it dynamically links libusb-1.0.so.0); without
|
||||||
# it idf_tools.py rejects the openocd install with exit 127 and aborts
|
# it idf_tools.py rejects the openocd install with exit 127 and aborts
|
||||||
# the whole framework setup.
|
# the whole framework setup.
|
||||||
RUN if command -v apk > /dev/null; then \
|
RUN apt-get update \
|
||||||
apk add --no-cache build-base libusb; \
|
&& apt-get install -y --no-install-recommends build-essential libusb-1.0-0 \
|
||||||
else \
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends build-essential libusb-1.0-0 \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user