mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 22:34:11 +02:00
Refactor Dockerfile for multi-stage builds
Refactor Dockerfile to use multi-stage builds for better organization and efficiency.
This commit is contained in:
@@ -22,9 +22,14 @@ ARG DASHBOARD_VERSION=2.31.0
|
|||||||
#################
|
#################
|
||||||
|
|
||||||
ARG BUILD_FROM
|
ARG BUILD_FROM
|
||||||
FROM ${BUILD_FROM}
|
FROM ${BUILD_FROM} as base
|
||||||
ENV BASHIO_VERSION=0.14.3
|
ENV BASHIO_VERSION=0.14.3
|
||||||
|
|
||||||
|
FROM netbirdio/management:${NETBIRD_VERSION} AS netbird-management
|
||||||
|
FROM netbirdio/signal:${NETBIRD_VERSION} AS netbird-signal
|
||||||
|
FROM netbirdio/relay:${NETBIRD_VERSION} AS netbird-relay
|
||||||
|
FROM netbirdio/dashboard:${DASHBOARD_VERSION} AS netbird-dashboard
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# 3 Modify Image #
|
# 3 Modify Image #
|
||||||
##################
|
##################
|
||||||
@@ -70,10 +75,7 @@ RUN chmod 744 /ha_autoapps.sh && /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.
|
|||||||
# 5 Copy NetBird components #
|
# 5 Copy NetBird components #
|
||||||
#############################
|
#############################
|
||||||
|
|
||||||
FROM netbirdio/management:${NETBIRD_VERSION} AS netbird-management
|
FROM base
|
||||||
FROM netbirdio/signal:${NETBIRD_VERSION} AS netbird-signal
|
|
||||||
FROM netbirdio/relay:${NETBIRD_VERSION} AS netbird-relay
|
|
||||||
FROM netbirdio/dashboard:${DASHBOARD_VERSION} AS netbird-dashboard
|
|
||||||
|
|
||||||
COPY --from=netbird-management /go/bin/netbird-mgmt /usr/local/bin/netbird-mgmt
|
COPY --from=netbird-management /go/bin/netbird-mgmt /usr/local/bin/netbird-mgmt
|
||||||
COPY --from=netbird-signal /go/bin/netbird-signal /usr/local/bin/netbird-signal
|
COPY --from=netbird-signal /go/bin/netbird-signal /usr/local/bin/netbird-signal
|
||||||
|
|||||||
Reference in New Issue
Block a user