diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 1fdebca3..cfc5b93e 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -25,6 +25,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Login to DHI + uses: docker/login-action@v3 + with: + registry: dhi.io + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to DockerHub uses: docker/login-action@v3 with: diff --git a/.github/workflows/full-test.yml b/.github/workflows/full-test.yml index 8629b28f..4a339fa4 100644 --- a/.github/workflows/full-test.yml +++ b/.github/workflows/full-test.yml @@ -33,6 +33,13 @@ jobs: echo "PHOTON_VERSION=$PHOTON_VERSION" >> "$GITHUB_ENV" echo "Photon Version: $PHOTON_VERSION" + - name: Login to DHI + uses: docker/login-action@v3 + with: + registry: dhi.io + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build test image uses: docker/build-push-action@v6 with: diff --git a/Dockerfile b/Dockerfile index e6e6bfec..9f67f29a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:21.0.9_10-jre-noble +FROM dhi.io/eclipse-temurin:21.0.9-debian13 # install astral uv COPY --from=ghcr.io/astral-sh/uv:0.8 /uv /usr/local/bin/ @@ -9,12 +9,12 @@ ARG PUID=9011 ARG PGID=9011 RUN apt-get update \ - && apt-get -y install --no-install-recommends \ - lbzip2 \ - gosu \ - python3.12 \ - curl \ - && rm -rf /var/lib/apt/lists/* + && apt-get -y install --no-install-recommends \ + lbzip2 \ + gosu \ + python3.12 \ + curl \ + && rm -rf /var/lib/apt/lists/* RUN groupadd -g ${PGID} -o photon && \ useradd -l -u ${PUID} -g photon -o -s /bin/false -m -d /photon photon @@ -36,15 +36,15 @@ RUN chmod 644 /photon/photon.jar && \ chown -R photon:photon /photon LABEL org.opencontainers.image.title="photon-docker" \ - org.opencontainers.image.description="Unofficial docker image for the Photon Geocoder" \ - org.opencontainers.image.url="https://github.com/rtuszik/photon-docker" \ - org.opencontainers.image.source="https://github.com/rtuszik/photon-docker" \ - org.opencontainers.image.documentation="https://github.com/rtuszik/photon-docker#readme" + org.opencontainers.image.description="Unofficial docker image for the Photon Geocoder" \ + org.opencontainers.image.url="https://github.com/rtuszik/photon-docker" \ + org.opencontainers.image.source="https://github.com/rtuszik/photon-docker" \ + org.opencontainers.image.documentation="https://github.com/rtuszik/photon-docker#readme" EXPOSE 2322 HEALTHCHECK --interval=30s --timeout=10s --start-period=240s --retries=3 \ - CMD curl -f http://localhost:2322/status || exit 1 + CMD curl -f http://localhost:2322/status || exit 1 ENTRYPOINT ["/bin/sh", "entrypoint.sh"] CMD ["uv", "run", "-m", "src.process_manager"]