diff --git a/.github/build-image.yml b/.github/build-image.yml new file mode 100644 index 0000000..986200e --- /dev/null +++ b/.github/build-image.yml @@ -0,0 +1,59 @@ +name: Image Build +on: + # Manueel starte + workflow_dispatch: + +jobs: + init: + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + iventoy: ${{ steps.healthchecks.outputs.version }} + steps: + - + name: check version iventoy + id: iventoy + run: | + echo "version=$(echo iventoy-1.0.07-linux.tar.gz | cut -d '-' -f2)" >> $GITHUB_OUTPUT + - + name: print + run: | + echo ${{ steps.iventoy.outputs.version }} + + docker: + name: iventoy image + runs-on: ubuntu-latest + needs: + - init + steps: + - + name: init vars + run: | + echo "iventoy: ${{ needs.init.outputs.iventoy }}" + - + name: Checkout + uses: actions/checkout@v3 + - + name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Build and push + uses: docker/build-push-action@v3 + with: + provenance: false # Breaking change introduced with 3.3.0 https://github.com/docker/build-push-action/releases/tag/v3.3.0, when an image is pushed since that version I can't retrieve the blob with labels anymore based on the digest via registry api, night have to look into an alternative way to do this + context: . + file: ./Dockerfile + labels: | + IVENTOY=${{ needs.init.outputs.iventoy }} + build-args: | + HEALTHCHECKS=${{ needs.init.outputs.iventoy }} + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ needs.init.outputs.iventoy }} + ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2d1461c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# Get latest iventoy version +# y use google drive -_-, it's to easy to use github so we can automate getting the latest versions and build this container +FROM ziggyds/alpine-utils:latest AS init +WORKDIR /iventoy +COPY ./iventoy-1.0.07-linux.tar.gz /iventoy/iventoy-1.0.07-linux.tar.gz +RUN tar -xvf *.tar.gz + +FROM alpine:3.18.2 +WORKDIR / + +# Copy and install inventoy +COPY --from=init /iventoy / +RUN chmod +x /app/lib/iventoy + +CMD ["/bin/bash", "-c", "bash /iventoy.sh start && sleep infinity"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c3cc381 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3.9' +services: + iventoy: + image: ziggyds/iventoy:latest + container_name: iventoy + restart: always + privileged: true #must be true + ports: + - 16000:16000 + - 26000:26000 + env: + IVENTOY_API_ALL=1 + volumes: + - /ISO_PATH:/iventoy/iso \ No newline at end of file diff --git a/iventoy-1.0.07-linux.tar.gz b/iventoy-1.0.07-linux.tar.gz new file mode 100644 index 0000000..f44d40a Binary files /dev/null and b/iventoy-1.0.07-linux.tar.gz differ