Compare commits

..

2 Commits

Author SHA1 Message Date
c835707f34 revert 8b79e5ace8
Some checks failed
/ release-and-build (push) Failing after 14s
revert Dockerfile aktualisiert
2026-03-25 10:01:20 +00:00
8b79e5ace8 Dockerfile aktualisiert
Some checks failed
/ release-and-build (push) Failing after 11s
2026-03-24 13:12:17 +00:00
17 changed files with 78 additions and 179 deletions

View File

@@ -371,27 +371,11 @@ jobs:
run: |
git config --local user.email "action@pi-farm.de"
git config --local user.name "Gitea Action"
# Sicherstellen, dass wir etwas zum Committen haben
git add VERSION.history README.md docker-compose.yml
# Nur committen, wenn es Änderungen gibt
git diff --quiet && git diff --staged --quiet || git commit -m "${{ env.FINAL_MSG }} [skip ci]"
# Das Tag exakt so setzen, wie es in prep definiert wurde (ohne extra 'v')
TARGET_TAG="${{ steps.prep.outputs.docker_tag }}"
git tag -f "$TARGET_TAG"
if [[ "${{ gitea.ref }}" == refs/tags/* ]]; then
echo "🏷️ Build aus Tag getriggert: $TARGET_TAG"
# Wir pushen das Tag (force), um die Doku-Updates einzuschließen
git push -f origin "$TARGET_TAG"
else
echo "🌿 Build aus Branch/Schedule getriggert: ${{ gitea.ref_name }}"
# In den Branch pushen (HEAD:branch_name) und das Tag setzen
git push origin HEAD:${{ gitea.ref_name }}
git push -f origin "$TARGET_TAG"
fi
git tag -f "v${{ steps.prep.outputs.docker_tag }}"
git push origin main
git push -f origin "v${{ steps.prep.outputs.docker_tag }}"
- name: Cleanup Temporary Tags on Docker Hub
if: steps.check_changes.outputs.should_build == 'true' && contains(steps.prep.outputs.push_targets, 'dockerhub')

3
.gitignore vendored
View File

@@ -17,6 +17,3 @@ data/*
# solltest du sie hier ebenfalls ausschließen:
config/*
!config/.gitkeep
# VS-Code spezifisch
.vscode/

View File

@@ -1,34 +1,27 @@
ARG BUILD_BASE_IMAGE
ARG BUILD_RUNTIME_IMAGE
FROM ${BUILD_BASE_IMAGE} AS builder
# Example Dockerfile for amd64
ARG BASE_IMAGE=alpine:latest
ARG BUILD_TAG
ARG BUILD_MAINTAINER
ARG BUILD_TZ
ARG BUILD_APP_NAME
ARG BUILD_APP_USER
ARG BUILD_APP_GIT
ARG ENV_TZ
FROM ${BASE_IMAGE}
LABEL maintainer="${BUILD_MAINTAINER}"
LABEL org.opencontainers.image.title="${BUILD_APP_NAME}"
ARG MAINTAINER
ARG TZ
ARG APP_NAME
ARG APP_USER
ENV TZ=${ENV_TZ}
LABEL maintainer="${MAINTAINER}"
LABEL org.opencontainers.image.title="${APP_NAME}"
RUN apt update && \
apt install -y git build-essential cmake curl ninja-build ccache git libcurl4-openssl-dev libevent-dev ruby libtbb-dev && \
git clone ${BUILD_APP_GIT} /app/hibp && \
cd /app/hibp && \
git submodule update --init --recursive && \
cd ext/restinio && \
gem install Mxx_ru && \
mxxruexternals && \
cd ../.. && \
./build.sh -c gcc -b release
ENV TZ=${TZ}
ENV USER=${APP_USER}
FROM ${BUILD_RUNTIME_IMAGE}
RUN apk add --no-cache tzdata ca-certificates
COPY --from=builder /app/hibp/build/gcc/release/* /usr/local/bin/
COPY root/ /
VOLUME /data
EXPOSE 8082
WORKDIR /app
COPY ./config /app/config
COPY ./data /app/data
RUN adduser -D ${APP_USER} && chown -R ${APP_USER}:${APP_USER} /app
USER ${APP_USER}
CMD ["sh"]

View File

@@ -1,34 +1,27 @@
ARG BUILD_BASE_IMAGE
ARG BUILD_RUNTIME_IMAGE
FROM ${BUILD_BASE_IMAGE} AS builder
# Example Dockerfile for arm64
ARG BASE_IMAGE=alpine:latest
ARG BUILD_TAG
ARG BUILD_MAINTAINER
ARG BUILD_TZ
ARG BUILD_APP_NAME
ARG BUILD_APP_USER
ARG BUILD_APP_GIT
ARG ENV_TZ
FROM ${BASE_IMAGE}
LABEL maintainer="${BUILD_MAINTAINER}"
LABEL org.opencontainers.image.title="${BUILD_APP_NAME}"
ARG MAINTAINER
ARG TZ
ARG APP_NAME
ARG APP_USER
ENV TZ=${ENV_TZ}
LABEL maintainer="${MAINTAINER}"
LABEL org.opencontainers.image.title="${APP_NAME}"
RUN apt update && \
apt install -y git build-essential cmake curl ninja-build ccache git libcurl4-openssl-dev libevent-dev ruby libtbb-dev && \
git clone ${BUILD_APP_GIT} /app/hibp && \
cd /app/hibp && \
git submodule update --init --recursive && \
cd ext/restinio && \
gem install Mxx_ru && \
mxxruexternals && \
cd ../.. && \
./build.sh -c gcc -b release
ENV TZ=${TZ}
ENV USER=${APP_USER}
FROM ${BUILD_RUNTIME_IMAGE}
RUN apk add --no-cache tzdata ca-certificates
COPY --from=builder /app/hibp/build/gcc/release/* /usr/local/bin/
COPY root/ /
VOLUME /data
EXPOSE 8082
WORKDIR /app
COPY ./config /app/config
COPY ./data /app/data
RUN adduser -D ${APP_USER} && chown -R ${APP_USER}:${APP_USER} /app
USER ${APP_USER}
CMD ["sh"]

View File

@@ -1,55 +1,16 @@
# hibp-docker
Docker implementation of https://github.com/oschonrock/hibp.git.
[![Build Status](https://git.pi-farm.de/pi-farm/hibp-docker/actions/workflows/build-and-push.yaml/badge.svg)](https://git.pi-farm.de/pi-farm/hibp-docker/actions)
[![Gitea Repo](https://img.shields.io/badge/gitea-repository-blue?logo=gitea&logoColor=white)](__REPO_URL__)
# Projekt: {{.RepoName}} [![Build Status](https://git.pi-farm.de/{{.Owner.Name}}/{{.RepoName}}/actions/workflows/build-and-push.yaml/badge.svg)](https://git.pi-farm.de/{{.Owner.Name}}/{{.RepoName}}/actions)
This repository is built and pushed automatically.
### 🏗️ Platform Support
| Architecture | Status | Base Image | Build Date |
| :--- | :--- | :--- | :--- |
| x86_64 (amd64) | ✅ Active | git.pi-farm.de/pi-farm/docker-baseimage-debian:trixie-slim | 25.03.2026 10:29 |
| aarch64 (arm64) | ✅ Active | git.pi-farm.de/pi-farm/docker-baseimage-debian:trixie-slim | 25.03.2026 10:29 |
### 🚀 Docker Pull
```bash
docker pull git.pi-farm.de/pi-farm/hibp-docker:0.6.2
```
### 🚀 Docker Compose
```yaml
services:
hibp-docker:
image: git.pi-farm.de/pi-farm/hibp-docker:0.6.2
container_name: hibp-docker
restart: unless-stopped
ports:
- 8082:8082
environment:
- TZ=Europe/Berlin
- PUID=1000
- PGID=1000
volumes:
- /data
```
### 🚀 Docker Run
```bash
docker run -d \
--name hibp-docker \
--restart unless-stopped \
-e TZ=Europe/Berlin \
-e PUID=1000 \
-e PGID=1000 \
-v /data \
-p 8082:8082 \
git.pi-farm.de/pi-farm/hibp-docker:0.6.2
```
*Last updated on: 25.03.2026 10:29*
### 📜 Version History
| Version | Date | Status |
| Architecture | Status | Base-Image |
| :--- | :--- | :--- |
| **0.6.2** | 25.03.2026 10:29 | ✅ |
| **x86_64** (amd64) | ✅ Active | `__BASE_IMAGE__` |
| **aarch64** (arm64) | __ARM_STATUS__ | `__BASE_IMAGE__` |
### 🚀 Docker Pull Command
```bash
docker pull git.pi-farm.de/{{.Owner.Name}}/{{.RepoName}}:latest
```
---
*Last updated on: __DATE__*

View File

@@ -1 +0,0 @@
| **0.6.2** | 25.03.2026 10:29 | ✅ |

View File

@@ -1,21 +1,26 @@
## BUILD STAGE
BUILD_TAG=0.6.2
BUILD_TAG_LATEST=n
BUILD_BASE_IMAGE=git.pi-farm.de/pi-farm/docker-baseimage-debian:trixie-slim
BUILD_RUNTIME_IMAGE=git.pi-farm.de/pi-farm/docker-baseimage-debian:trixie-slim
BUILD_MAINTAINER=pi-farm
BUILD_APP_VERSION=${BUILD_TAG}
BUILD_APP_GIT=https://github.com/oschonrock/hibp.git
BUILD_APP_NAME=hibp
BUILD_APP_USER=pi
BUILD_APP_GID=1000
BUILD_TAG=1.00
BUILD_BASE_IMAGE=alpine:${BUILD_TAG}
## Examples for BUILD_BASE_IMAGE
# alpine:${BUILD_TAG}
# git.pi-farm.de/pi-farm/docker-baseimage-alpine:v${BUILD_TAG}
#BUILD_ALPINE_ARCH_AMD64=x86_64
#BUILD_ALPINE_ARCH_AARCH64=aarch64
#BUILD_S6_ARCH_amd64=x86_64
#BUILD_S6_ARCH_aarch64=aarch64
#BUILD_S6_OVERLAY_VERSION=3.2.0.2
#BUILD_MAINTAINER=pi-farm
#BUILD_APP_VERSION=v${BUILD_TAG}
#BUILD_APP_NAME=basimage-alpine
#BUILD_APP_USER=pi
#BUILD_APP_GID=1000
## ENV STAGE
ENV_TZ=Europe/Berlin
ENV_PUID=1000
ENV_PGID=1000
VOL_DATA=/data
PORT_WEB=8082:8082
PUSH=gitea
#,dockerhub
DESCRIPTION="Docker implementation of https://github.com/oschonrock/hibp.git."
# VOL_CONFIG=./config:/config
# VOL_DATA=./data:/data
# PORT_WEB=8080:80
#PUSH=gitea,dockerhub
DESCRIPTION="Example example example"

View File

@@ -1,13 +1 @@
services:
hibp-docker:
image: git.pi-farm.de/pi-farm/hibp-docker:0.6.2
container_name: hibp-docker
restart: unless-stopped
ports:
- 8082:8082
environment:
- TZ=Europe/Berlin
- PUID=1000
- PGID=1000
volumes:
- /data

View File

@@ -1,15 +0,0 @@
#!/usr/bin/with-contenv bash
echo "Start: init-hibp run script"
mkdir -p /data
if [ ! -f /data/*.bin ]; then
echo "Downloading /data/hibp_all.sha1.bin"
hibp-download /data/hibp_all.sha1.bin
fi
echo "Set permissions to PUID: ${PUID:-911} and PGID: ${PGID:-1000}"
chown -R "${PUID:-911}:${PGID:-1000}" /data
echo "Finish: init-hibp"

View File

@@ -1 +0,0 @@
oneshot

View File

@@ -1 +0,0 @@
/etc/s6-overlay/s6-rc.d/init-hibp/run

View File

@@ -1,3 +0,0 @@
#!/usr/bin/with-contenv bash
exec hibp-server --bind-address=0.0.0.0 --sha1-db=/data/hibp_all.sha1.bin

View File

@@ -1 +0,0 @@
longrun