├── .github └── workflows │ ├── Build-i386.yml │ └── Build.yml ├── Dockerfile ├── Dockerfile_i386 ├── README.md └── build └── start.sh /.github/workflows/Build-i386.yml: -------------------------------------------------------------------------------- 1 | name: Publish Docker image(i386) 2 | on: 3 | release: 4 | types: [published] 5 | workflow_dispatch: 6 | 7 | env: 8 | REGISTRY: ghcr.io 9 | IMAGE: disappear9/hentaiathome 10 | 11 | jobs: 12 | push_to_registry: 13 | name: Push Docker image 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Check out the repo 17 | uses: actions/checkout@v4 18 | with: 19 | fetch-depth: 1 20 | 21 | - name: Set up QEMU 22 | uses: docker/setup-qemu-action@v3 23 | 24 | - name: Set up Docker Buildx 25 | uses: docker/setup-buildx-action@v3 26 | 27 | - name: Log in to ghcr.io 28 | uses: docker/login-action@v3 29 | with: 30 | registry: ${{ env.REGISTRY }} 31 | username: ${{ github.actor }} 32 | password: ${{ secrets.GITHUB_TOKEN }} 33 | 34 | - name: Build and push for i386 35 | uses: docker/build-push-action@v5 36 | with: 37 | platforms: linux/i386 38 | push: true 39 | file: Dockerfile_i386 40 | tags: ${{ env.REGISTRY }}/${{ env.IMAGE }}:i386 41 | cache-from: type=gha,scope=i386 42 | cache-to: type=gha,mode=max,scope=i386 43 | annotations: | 44 | org.opencontainers.image.source=https://github.com/Disappear9/H-at-H-docker 45 | org.opencontainers.image.description=Dockerfile of Hentai@Home (arm,x64,x86) 46 | -------------------------------------------------------------------------------- /.github/workflows/Build.yml: -------------------------------------------------------------------------------- 1 | name: Publish Docker image 2 | on: 3 | release: 4 | types: [published] 5 | workflow_dispatch: 6 | 7 | env: 8 | REGISTRY: ghcr.io 9 | IMAGE: disappear9/hentaiathome 10 | 11 | jobs: 12 | push_to_registry: 13 | name: Push Docker image 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Check out the repo 17 | uses: actions/checkout@v4 18 | with: 19 | fetch-depth: 1 20 | 21 | - name: Set up QEMU 22 | uses: docker/setup-qemu-action@v3 23 | 24 | - name: Set up Docker Buildx 25 | uses: docker/setup-buildx-action@v3 26 | 27 | - name: Log in to ghcr.io 28 | uses: docker/login-action@v3 29 | with: 30 | registry: ${{ env.REGISTRY }} 31 | username: ${{ github.actor }} 32 | password: ${{ secrets.GITHUB_TOKEN }} 33 | 34 | - name: Build and push 35 | uses: docker/build-push-action@v5 36 | with: 37 | platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le 38 | push: true 39 | tags: ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest 40 | cache-from: type=gha,scope=${{ github.workflow }} 41 | cache-to: type=gha,mode=max,scope=${{ github.workflow }} 42 | annotations: | 43 | org.opencontainers.image.source=https://github.com/Disappear9/H-at-H-docker 44 | org.opencontainers.image.description=Dockerfile of Hentai@Home (arm,x64,x86) 45 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | ENV HatH_VERSION 1.6.4 4 | ENV HatH_SHA256 25351e4b43169f0bad25abcfe7f61034f03cca08b69f219727713975dc5b03b1 5 | 6 | RUN apk --no-cache add unzip \ 7 | && mkdir -p /hath \ 8 | && cd /hath \ 9 | && wget https://repo.e-hentai.org/hath/HentaiAtHome_$HatH_VERSION.zip -O hath.zip \ 10 | && echo -n ""$HatH_SHA256" hath.zip" | sha256sum -c \ 11 | && unzip hath.zip \ 12 | && mkdir -p /hath/data \ 13 | && mkdir -p /hath/download 14 | 15 | FROM eclipse-temurin:8-jre-focal AS release 16 | 17 | ENV HatH_ARGS --cache-dir=/hath/data/cache --data-dir=/hath/data/data --download-dir=/hath/download --log-dir=/hath/data/log --temp-dir=/hath/data/temp 18 | 19 | COPY --from=builder /hath /hath 20 | COPY build/start.sh /hath/start.sh 21 | WORKDIR /hath 22 | 23 | RUN apt-get update \ 24 | && apt-get install -y sqlite \ 25 | && rm -rf /var/lib/apt/lists/* \ 26 | && chmod +x /hath/start.sh 27 | 28 | CMD ["/hath/start.sh"] 29 | -------------------------------------------------------------------------------- /Dockerfile_i386: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | ENV HatH_VERSION 1.6.4 4 | ENV HatH_SHA256 25351e4b43169f0bad25abcfe7f61034f03cca08b69f219727713975dc5b03b1 5 | 6 | RUN apk --no-cache add unzip \ 7 | && mkdir -p /hath \ 8 | && cd /hath \ 9 | && wget https://repo.e-hentai.org/hath/HentaiAtHome_$HatH_VERSION.zip -O hath.zip \ 10 | && echo -n ""$HatH_SHA256" hath.zip" | sha256sum -c \ 11 | && unzip hath.zip \ 12 | && mkdir -p /hath/data \ 13 | && mkdir -p /hath/download 14 | 15 | FROM i386/ibmjava:jre AS release 16 | 17 | ENV HatH_ARGS --cache-dir=/hath/data/cache --data-dir=/hath/data/data --download-dir=/hath/download --log-dir=/hath/data/log --temp-dir=/hath/data/temp 18 | 19 | COPY --from=builder /hath /hath 20 | COPY build/start.sh /hath/start.sh 21 | WORKDIR /hath 22 | 23 | RUN apt-get update \ 24 | && apt-get install -y sqlite \ 25 | && rm -rf /var/lib/apt/lists/* \ 26 | && chmod +x /hath/start.sh 27 | 28 | CMD ["/hath/start.sh"] 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hentai@Home on Docker 2 | 3 | ## Support platforms: 4 | 5 | linux/amd64 6 | linux/arm64 7 | linux/arm 8 | linux/ppc64le 9 | linux/386 10 | 11 | ### For i386/x32: 12 | Eclipse temurin don't have images for i386/x32 , i use ibmjava instead. 13 | So use tag `ghcr.io/disappear9/hentaiathome:i386` 14 | 15 | 16 | ## Deploy 17 | 18 | Replace `/DOWNLOAD_DIR` `YOUR_CLIENT_KEY` `YOUR_PORT` with yours. 19 | 20 | ### The format of `YOUR_CLIENT_KEY` 21 | 22 | `"$Client ID"-"$Client Key"` like this: `000000-ABCDEFGHIJKLMN1234OP` 23 | 24 | ### About `YOUR_PORT` 25 | 26 | https://ehwiki.org/wiki/Technical_Issues#Ports 27 | 28 | ### Proxy (>=1.6.3) 29 | 30 | Add these environment variables: 31 | ``` 32 | ImageProxyHost 33 | ImageProxyType 34 | ImageProxyPort 35 | ``` 36 | 37 | quote: https://forums.e-hentai.org/index.php?showtopic=234458 38 | ``` 39 | --image-proxy-host= - hostname or IP address for the proxy 40 | --image-proxy-type= - can be "socks" or "http". defaults to "socks" if not provided 41 | --image-proxy-port= - the port of the proxy. defaults to 1080 for SOCKS and 8080 for HTTP if not provided 42 | 43 | It does not support proxies that require authentication. 44 | 45 | While it will technically work to use Tor as a SOCKS proxy, this should be avoided as Tor is too slow for this purpose. 46 | ``` 47 | 48 | ## Run command below: 49 | #Pull image 50 | sudo docker pull ghcr.io/disappear9/hentaiathome:latest 51 | 52 | #Create volume for caches and logs 53 | sudo docker volume create h_at_h_data 54 | 55 | #Run it 56 | sudo docker run -d --name h_at_h -p YOUR_PORT:YOUR_PORT -v h_at_h_data:/hath/data -v /DOWNLOAD_DIR:/hath/download -e HatH_KEY=YOUR_CLIENT_KEY ghcr.io/disappear9/hentaiathome 57 | 58 | ## Update: 59 | #Stop 60 | sudo docker stop h_at_h 61 | 62 | #Delete 63 | sudo docker rm h_at_h 64 | 65 | #Delete old image 66 | sudo docker rmi ghcr.io/disappear9/hentaiathome 67 | 68 | #Pull new image 69 | sudo docker pull ghcr.io/disappear9/hentaiathome 70 | 71 | #Run it 72 | sudo docker run -d --name h_at_h -p YOUR_PORT:YOUR_PORT -v h_at_h_data:/hath/data -v /DOWNLOAD_DIR:/hath/download ghcr.io/disappear9/hentaiathome 73 | 74 | Or 75 | sudo docker run -d --name h_at_h --net host -v h_at_h_data:/hath/data -v /DOWNLOAD_DIR:/hath/download ghcr.io/disappear9/hentaiathome 76 | If you want to change port in the future. 77 | 78 | 79 | ## Using docker-compose: 80 | version: '3' 81 | 82 | services: 83 | h_at_h: 84 | image: ghcr.io/disappear9/hentaiathome:latest 85 | volumes: 86 | - h_at_h_data:/hath/data 87 | - /LOCAL_DOWNLOAD_FOLDER:/hath/download 88 | ports: 89 | - YOUR_PORT:YOUR_PORT 90 | restart: unless-stopped 91 | environment: 92 | - HatH_KEY=YOUR_CLIENT_ID-YOUR_CLIENT_KEY 93 | 94 | volumes: 95 | h_at_h_data: 96 | 97 | ## For Unraid user: 98 | Add this to `Template repositories`: `https://github.com/Disappear9/dockerfile-other` 99 | Okay? unraid [removed Template Repositories](https://forums.unraid.net/topic/112170-allow-template-repositories-to-be-hosted-from-other-sources/#comment-1021630)😅 100 | 101 | ### About `Port:` 102 | (Container Port) and (Host Port) should be identical, 103 | or you could just switch to (Advanced View), and set (Network Type) to (Host). 104 | 105 | ## Changelog 106 | 2020/10/06 Graceful shutdown 107 | 2021/06/09 DockerHUB has stopped free plan from using Autobuild feature, until i found other ways to update image, there will not have any update. 108 | 2021/07/01 Now using Github action to build image. 109 | 2022/06/04 Use Eclipse temurin images. 110 | 2023/01/10 My DockerHub account got deleted for no reason, move image to ghcr.io 111 | 2023/09/16 Update to 1.6.2 & Add docker-compose to documentation 112 | 2024/05/16 Update to 1.6.3 & Add proxy support 113 | -------------------------------------------------------------------------------- /build/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | kill_jar() { 4 | echo 'Received TERM' 5 | pkill java 6 | wait "$(ps -ef | pgrep java)" 7 | echo 'Process finished' 8 | } 9 | 10 | if [ $HatH_KEY ] 11 | then 12 | echo -n "${HatH_KEY}" > /hath/data/data/client_login 13 | else 14 | if [ ! -f /hath/data/data/client_login ]; then 15 | echo "Login not found, try specify the HatH_KEY arg, exiting......" 16 | exit 1 17 | fi 18 | fi 19 | 20 | if [ $ImageProxyHost ] && [ $ImageProxyType ] && [ $ImageProxyPort ] 21 | then 22 | echo "Proxy arguments found! " 23 | trap 'kill_jar' TERM INT KILL 24 | java -jar HentaiAtHome.jar $HatH_ARGS --image-proxy-host=$ImageProxyHost --image-proxy-type=$ImageProxyType --image-proxy-port=$ImageProxyPort $HatH_ADV_ARGS & 25 | wait $! 26 | else 27 | trap 'kill_jar' TERM INT KILL 28 | java -jar HentaiAtHome.jar $HatH_ARGS $HatH_ADV_ARGS & 29 | wait $! 30 | fi 31 | --------------------------------------------------------------------------------