alessandrojean / tankobon

[WIP] Self-hosted physical book collection manager.
https://alessandrojean.github.io/tankobon/
MIT License
28 stars 3 forks source link

Add Dockerfile to create Docker image #32

Closed ghostbear closed 1 year ago

ghostbear commented 1 year ago

Closes #27

This adds a Dockerfile to create a simple Docker image for deployment.

Usages

docker build -t tankobon--target tankobon-deploy .

GitHub Action for uploading to registry

  - name: Extract metadata (tags, labels) for Docker
    id: tankobon
    uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
    with:
      images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
  - name: Build and push Docker image
    uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
    with:
      context: .
      push: true
      target: tankobon-deploy
      tags: ${{ steps.tankobon.outputs.tags }}
      labels: ${{ steps.tankobon.outputs.labels }}

More info here https://docs.github.com/en/actions/publishing-packages/publishing-docker-images

alessandrojean commented 1 year ago

Thanks for the contribution, again!