Compare commits
2 Commits
dev
...
c835707f34
| Author | SHA1 | Date | |
|---|---|---|---|
| c835707f34 | |||
| 8b79e5ace8 |
@@ -371,27 +371,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config --local user.email "action@pi-farm.de"
|
git config --local user.email "action@pi-farm.de"
|
||||||
git config --local user.name "Gitea Action"
|
git config --local user.name "Gitea Action"
|
||||||
|
|
||||||
# Sicherstellen, dass wir etwas zum Committen haben
|
|
||||||
git add VERSION.history README.md docker-compose.yml
|
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]"
|
git diff --quiet && git diff --staged --quiet || git commit -m "${{ env.FINAL_MSG }} [skip ci]"
|
||||||
|
git tag -f "v${{ steps.prep.outputs.docker_tag }}"
|
||||||
# Das Tag exakt so setzen, wie es in prep definiert wurde (ohne extra 'v')
|
git push origin main
|
||||||
TARGET_TAG="${{ steps.prep.outputs.docker_tag }}"
|
git push -f origin "v${{ 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
|
|
||||||
|
|
||||||
- name: Cleanup Temporary Tags on Docker Hub
|
- name: Cleanup Temporary Tags on Docker Hub
|
||||||
if: steps.check_changes.outputs.should_build == 'true' && contains(steps.prep.outputs.push_targets, 'dockerhub')
|
if: steps.check_changes.outputs.should_build == 'true' && contains(steps.prep.outputs.push_targets, 'dockerhub')
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -17,6 +17,3 @@ data/*
|
|||||||
# solltest du sie hier ebenfalls ausschließen:
|
# solltest du sie hier ebenfalls ausschließen:
|
||||||
config/*
|
config/*
|
||||||
!config/.gitkeep
|
!config/.gitkeep
|
||||||
|
|
||||||
# VS-Code spezifisch
|
|
||||||
.vscode/
|
|
||||||
|
|||||||
49
Dockerfile
49
Dockerfile
@@ -1,34 +1,27 @@
|
|||||||
ARG BUILD_BASE_IMAGE
|
# Example Dockerfile for amd64
|
||||||
ARG BUILD_RUNTIME_IMAGE
|
ARG BASE_IMAGE=alpine:latest
|
||||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
|
||||||
|
|
||||||
ARG BUILD_TAG
|
FROM ${BASE_IMAGE}
|
||||||
ARG BUILD_MAINTAINER
|
|
||||||
ARG BUILD_TZ
|
|
||||||
ARG BUILD_APP_NAME
|
|
||||||
ARG BUILD_APP_USER
|
|
||||||
ARG BUILD_APP_GIT
|
|
||||||
ARG ENV_TZ
|
|
||||||
|
|
||||||
LABEL maintainer="${BUILD_MAINTAINER}"
|
ARG MAINTAINER
|
||||||
LABEL org.opencontainers.image.title="${BUILD_APP_NAME}"
|
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 && \
|
ENV TZ=${TZ}
|
||||||
apt install -y git build-essential cmake curl ninja-build ccache git libcurl4-openssl-dev libevent-dev ruby libtbb-dev && \
|
ENV USER=${APP_USER}
|
||||||
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
|
|
||||||
|
|
||||||
FROM ${BUILD_RUNTIME_IMAGE}
|
RUN apk add --no-cache tzdata ca-certificates
|
||||||
|
|
||||||
COPY --from=builder /app/hibp/build/gcc/release/* /usr/local/bin/
|
WORKDIR /app
|
||||||
COPY root/ /
|
COPY ./config /app/config
|
||||||
VOLUME /data
|
COPY ./data /app/data
|
||||||
EXPOSE 8082
|
|
||||||
|
RUN adduser -D ${APP_USER} && chown -R ${APP_USER}:${APP_USER} /app
|
||||||
|
|
||||||
|
USER ${APP_USER}
|
||||||
|
|
||||||
|
CMD ["sh"]
|
||||||
@@ -1,34 +1,27 @@
|
|||||||
ARG BUILD_BASE_IMAGE
|
# Example Dockerfile for arm64
|
||||||
ARG BUILD_RUNTIME_IMAGE
|
ARG BASE_IMAGE=alpine:latest
|
||||||
FROM ${BUILD_BASE_IMAGE} AS builder
|
|
||||||
|
|
||||||
ARG BUILD_TAG
|
FROM ${BASE_IMAGE}
|
||||||
ARG BUILD_MAINTAINER
|
|
||||||
ARG BUILD_TZ
|
|
||||||
ARG BUILD_APP_NAME
|
|
||||||
ARG BUILD_APP_USER
|
|
||||||
ARG BUILD_APP_GIT
|
|
||||||
ARG ENV_TZ
|
|
||||||
|
|
||||||
LABEL maintainer="${BUILD_MAINTAINER}"
|
ARG MAINTAINER
|
||||||
LABEL org.opencontainers.image.title="${BUILD_APP_NAME}"
|
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 && \
|
ENV TZ=${TZ}
|
||||||
apt install -y git build-essential cmake curl ninja-build ccache git libcurl4-openssl-dev libevent-dev ruby libtbb-dev && \
|
ENV USER=${APP_USER}
|
||||||
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
|
|
||||||
|
|
||||||
FROM ${BUILD_RUNTIME_IMAGE}
|
RUN apk add --no-cache tzdata ca-certificates
|
||||||
|
|
||||||
COPY --from=builder /app/hibp/build/gcc/release/* /usr/local/bin/
|
WORKDIR /app
|
||||||
COPY root/ /
|
COPY ./config /app/config
|
||||||
VOLUME /data
|
COPY ./data /app/data
|
||||||
EXPOSE 8082
|
|
||||||
|
RUN adduser -D ${APP_USER} && chown -R ${APP_USER}:${APP_USER} /app
|
||||||
|
|
||||||
|
USER ${APP_USER}
|
||||||
|
|
||||||
|
CMD ["sh"]
|
||||||
61
README.md
61
README.md
@@ -1,55 +1,16 @@
|
|||||||
# hibp-docker
|
# Projekt: {{.RepoName}} [](https://git.pi-farm.de/{{.Owner.Name}}/{{.RepoName}}/actions)
|
||||||
Docker implementation of https://github.com/oschonrock/hibp.git.
|
|
||||||
|
|
||||||
[](https://git.pi-farm.de/pi-farm/hibp-docker/actions)
|
|
||||||
[](__REPO_URL__)
|
|
||||||
|
|
||||||
This repository is built and pushed automatically.
|
This repository is built and pushed automatically.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 🏗️ Platform Support
|
### 🏗️ Platform Support
|
||||||
| Architecture | Status | Base Image | Build Date |
|
| Architecture | Status | Base-Image |
|
||||||
| :--- | :--- | :--- | :--- |
|
|
||||||
| 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 |
|
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
| **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__*
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
| **0.6.2** | 25.03.2026 10:29 | ✅ |
|
|
||||||
|
|||||||
@@ -1,21 +1,26 @@
|
|||||||
## BUILD STAGE
|
## BUILD STAGE
|
||||||
BUILD_TAG=0.6.2
|
BUILD_TAG=1.00
|
||||||
BUILD_TAG_LATEST=n
|
BUILD_BASE_IMAGE=alpine:${BUILD_TAG}
|
||||||
BUILD_BASE_IMAGE=git.pi-farm.de/pi-farm/docker-baseimage-debian:trixie-slim
|
## Examples for BUILD_BASE_IMAGE
|
||||||
BUILD_RUNTIME_IMAGE=git.pi-farm.de/pi-farm/docker-baseimage-debian:trixie-slim
|
# alpine:${BUILD_TAG}
|
||||||
BUILD_MAINTAINER=pi-farm
|
# git.pi-farm.de/pi-farm/docker-baseimage-alpine:v${BUILD_TAG}
|
||||||
BUILD_APP_VERSION=${BUILD_TAG}
|
#BUILD_ALPINE_ARCH_AMD64=x86_64
|
||||||
BUILD_APP_GIT=https://github.com/oschonrock/hibp.git
|
#BUILD_ALPINE_ARCH_AARCH64=aarch64
|
||||||
BUILD_APP_NAME=hibp
|
#BUILD_S6_ARCH_amd64=x86_64
|
||||||
BUILD_APP_USER=pi
|
#BUILD_S6_ARCH_aarch64=aarch64
|
||||||
BUILD_APP_GID=1000
|
#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 STAGE
|
||||||
ENV_TZ=Europe/Berlin
|
ENV_TZ=Europe/Berlin
|
||||||
ENV_PUID=1000
|
ENV_PUID=1000
|
||||||
ENV_PGID=1000
|
ENV_PGID=1000
|
||||||
VOL_DATA=/data
|
# VOL_CONFIG=./config:/config
|
||||||
PORT_WEB=8082:8082
|
# VOL_DATA=./data:/data
|
||||||
PUSH=gitea
|
# PORT_WEB=8080:80
|
||||||
#,dockerhub
|
#PUSH=gitea,dockerhub
|
||||||
DESCRIPTION="Docker implementation of https://github.com/oschonrock/hibp.git."
|
DESCRIPTION="Example example example"
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|||||||
@@ -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"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
oneshot
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/etc/s6-overlay/s6-rc.d/init-hibp/run
|
|
||||||
@@ -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
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
longrun
|
|
||||||
Reference in New Issue
Block a user