happyDomain/Dockerfile-builded
Pierre-Olivier Mercier f0b3a0f94d ci: fix pipeline inconsistencies and improve Docker builds
- Replace DRONE_TAG##v with DRONE_SEMVER across all pipelines
- Add missing VERSION build_args and tag-specific Docker publish steps to amd64 pipeline
- Add prerelease: true to amd64 release publish steps for consistency with arm64
- Pin swag and go-licenses versions with renovate annotations
- Add renovate regex manager to track go install versions in .drone.yml
- Add BuildKit cache mounts and OCI labels to Dockerfiles
- Improve Dockerfile layer efficiency (separate web/web-admin asset copies, smaller COPY targets)
- Move npm build/generate directives to separate generate_npm.go files with //go:build ignore
- Update README build instructions to include web-admin and correct step order
2026-05-10 20:17:55 +08:00

32 lines
916 B
Text

FROM alpine:3.23
ARG VERSION=dev
LABEL org.opencontainers.image.title="happyDomain" \
org.opencontainers.image.description="Making DNS simple for everyone" \
org.opencontainers.image.url="https://happydomain.org" \
org.opencontainers.image.source="https://git.happydns.org/happydomain" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.licenses="AGPL-3.0-or-later"
EXPOSE 8081
ENTRYPOINT ["/usr/sbin/happyDomain"]
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD curl --fail http://localhost:8081/api/version
ENV HAPPYDOMAIN_LEVELDB_PATH=/data/happydomain.db
RUN apk add --no-cache \
curl \
jq \
&& \
adduser --system --no-create-home --uid 15353 happydomain && \
mkdir /data && chown happydomain /data
USER happydomain
WORKDIR /data
VOLUME /data
COPY happydomain /usr/sbin/happyDomain
COPY hadmin.sh /usr/bin/hadmin