Files
hassio-addons/ente/Dockerfile
Alexandre a4b100feea fix(ente): unbreak build — base image moved to ghcr.io/ente/server (#2946)
* fix(ente): base image moved to ghcr.io/ente/server

Upstream renamed the GitHub org ente-io -> ente. github.com redirects, so the
web-builder clone still worked, but GHCR does not redirect: the base image
ghcr.io/ente-io/server:latest now resolves to 'not found' and every rebuild
failed (run 31227202542).

Points the base image and the web source clone at the new org, and lands the
4.4.25 bump the updater bot had reverted by the same failure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(ente): sync build.json and README to the renamed org, tidy changelog

build.json still pinned ghcr.io/ente-io/server:927c6a31... — a dead reference
after the org rename (the pinned digest does resolve under ente/server, verified
200 from the registry). It is inert today since this Dockerfile hardcodes its
FROM rather than consuming ARG BUILD_FROM, but leaving a dead ref there is a
trap for the next person.

Also repoints the two README links and matches the changelog date format to the
surrounding entries.

Reported by Copilot on PR #2946.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 11:54:31 +02:00

158 lines
5.2 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#============================#
# ALEXBELGIUM'S DOCKERFILE #
#============================#
# Home Assistant Add-on ENTE (server + web UI)
########################################################
# 0) Build the ente-web static front-end (multi-stage) #
########################################################
FROM node:24 AS web-builder
# Build-time selector; set `--build-arg ENTE_WEB_TAG=vX.Y.Z` if you want a specific release
ARG ENTE_WEB_TAG=main
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Tools needed to build (git, rust for ente-wasm)
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
curl \
ca-certificates \
build-essential \
; \
rm -rf /var/lib/apt/lists/*; \
\
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --target wasm32-unknown-unknown
# Pull the web source
WORKDIR /src
RUN git clone --depth 1 --branch "${ENTE_WEB_TAG}" https://github.com/ente/ente.git .
# Build web workspace (lives in ./web)
WORKDIR /src/web
ENV NEXT_PUBLIC_ENTE_ENDPOINT=ENTE_API_ORIGIN_PLACEHOLDER
ENV NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=ENTE_ALBUMS_ORIGIN_PLACEHOLDER
RUN npm ci
RUN npm run build:photos
RUN npm run build:albums
RUN npm run build:accounts
RUN npm run build:auth
RUN npm run build:cast
RUN npm run build:share
RUN npm run build:embed
RUN npm run build:paste
RUN npm run build:locker
RUN npm run build:memories
#################
# 1) Base image #
#################
FROM ghcr.io/ente/server:latest
##################
# 2) Tune image #
##################
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
S6_SERVICES_GRACETIME=0
USER root
# --- LSIO helper ---
COPY ha_lsio.sh /ha_lsio.sh
ARG CONFIGLOCATION="/config"
RUN set -eux; \
chmod 744 /ha_lsio.sh; \
if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi; \
rm /ha_lsio.sh
# --- MinIO, psql client etc.
RUN set -eux; \
BUILD_ARCH="$(uname -m)"; \
echo "${BUILD_ARCH}"; \
ARCH="amd64"; \
if echo "${BUILD_ARCH}" | grep -Eq 'aarch64|armv8|arm64'; then ARCH="arm64"; fi; \
apk add --no-cache bash curl ca-certificates wget jq tini postgresql15-client; \
curl -fsSL "https://dl.min.io/server/minio/release/linux-${ARCH}/minio" -o /usr/local/bin/minio; \
curl -fsSL "https://dl.min.io/client/mc/release/linux-${ARCH}/mc" -o /usr/local/bin/mc; \
chmod +x /usr/local/bin/minio /usr/local/bin/mc
RUN apk add --no-cache \
lsb-release curl gnupg wget tini jq sudo \
postgresql postgresql-client
# ---------- ente-web bundle ----------
RUN apk add --no-cache nginx
# Static files built in the previous stage
COPY --from=web-builder /src/web/apps/photos/out /www/photos
COPY --from=web-builder /src/web/apps/albums/out /www/albums
COPY --from=web-builder /src/web/apps/accounts/out /www/accounts
COPY --from=web-builder /src/web/apps/auth/out /www/auth
COPY --from=web-builder /src/web/apps/cast/out /www/cast
COPY --from=web-builder /src/web/apps/share/out /www/share
COPY --from=web-builder /src/web/apps/embed/out /www/embed
COPY --from=web-builder /src/web/apps/paste/out /www/paste
COPY --from=web-builder /src/web/apps/locker/out /www/locker
COPY --from=web-builder /src/web/apps/memories/out /www/memories
############################
# 3) Install add-on helpers #
############################
COPY rootfs/ /
RUN find . -type f \( -name "*.sh" -o -name "run" -o -name "finish" \) -print -exec chmod +x {} \;
ARG MODULES="00-banner.sh 01-custom_script.sh 00-global_var.sh 00-local_mounts.sh 00-smb_mounts.sh"
COPY ha_automodules.sh /ha_automodules.sh
RUN set -eux; \
chmod 744 /ha_automodules.sh; \
/ha_automodules.sh "$MODULES"; \
rm /ha_automodules.sh
ENV PACKAGES="sudo jq yamllint nginx"
COPY ha_autoapps.sh /ha_autoapps.sh
RUN set -eux; \
chmod 744 /ha_autoapps.sh; \
/ha_autoapps.sh "$PACKAGES"; \
rm /ha_autoapps.sh
###############
# 4) Entrypoint
###############
ENV S6_STAGE2_HOOK=/ha_entrypoint.sh
COPY ha_entrypoint.sh /ha_entrypoint.sh
RUN chmod +x /ha_entrypoint.sh
ENTRYPOINT ["/usr/bin/env"]
CMD ["/ha_entrypoint.sh"]
############
# 5) Labels
############
ARG BUILD_VERSION BUILD_ARCH BUILD_DATE BUILD_NAME BUILD_DESCRIPTION BUILD_REF BUILD_REPOSITORY
LABEL \
io.hass.name="${BUILD_NAME}" \
io.hass.description="${BUILD_DESCRIPTION}" \
io.hass.arch="${BUILD_ARCH}" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="alexbelgium (https://github.com/alexbelgium)" \
org.opencontainers.image.title="${BUILD_NAME}" \
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
org.opencontainers.image.url="https://github.com/alexbelgium" \
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.revision=${BUILD_REF} \
org.opencontainers.image.version=${BUILD_VERSION}
#################
# 6) Finish line
#################
EXPOSE 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009