From 71b4697cdb4bb1d607f71d1cbcc9b7eeb2772857 Mon Sep 17 00:00:00 2001 From: Rahman Yusuf Date: Sun, 14 Jul 2024 18:57:03 +0700 Subject: [PATCH] Use alpine linux for base image in Dockerfile --- .github/workflows/build.yml | 66 +++++++++++++++++++------------------ Dockerfile | 2 +- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 92d50b49..aca96ac4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,7 @@ jobs: docker-dockerhub-build-and-push: name: Docker build and push (hub.docker.com) runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mansuf/mangadex-downloader' + # if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mansuf/mangadex-downloader' steps: - name: Checkout uses: actions/checkout@v4 @@ -89,26 +89,27 @@ jobs: push: true tags: | ${{ env.DOCKERHUB_LATEST_TAG }} - mansuf/mangadex-downloader:${{ github.ref_name }} - - - name: Build and push (with optional dependencies) - uses: docker/build-push-action@v5 - with: - context: . - file: Dockerfile.optional - platforms: | - linux/amd64 - linux/arm64 - linux/arm/v7 - push: true - tags: | - ${{ env.DOCKERHUB_LATEST_OPTIONAL_TAG }} - mansuf/mangadex-downloader:${{ github.ref_name }}-optional + + # mansuf/mangadex-downloader:${{ github.ref_name }} + + # - name: Build and push (with optional dependencies) + # uses: docker/build-push-action@v5 + # with: + # context: . + # file: Dockerfile.optional + # platforms: | + # linux/amd64 + # linux/arm64 + # linux/arm/v7 + # push: true + # tags: | + # ${{ env.DOCKERHUB_LATEST_OPTIONAL_TAG }} + # mansuf/mangadex-downloader:${{ github.ref_name }}-optional docker-aws-ecr-build-and-push: name: Docker build and push (public.ecr.aws) runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mansuf/mangadex-downloader' + # if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mansuf/mangadex-downloader' steps: - name: Checkout uses: actions/checkout@v4 @@ -138,21 +139,22 @@ jobs: push: true tags: | ${{ env.AWS_ECR_LATEST_TAG }} - public.ecr.aws/n3n5b0s8/mansuf/mangadex-downloader:${{ github.ref_name }} - - - name: Build and push (with optional dependencies) - uses: docker/build-push-action@v5 - with: - context: . - file: Dockerfile.optional - platforms: | - linux/amd64 - linux/arm64 - linux/arm/v7 - push: true - tags: | - ${{ env.AWS_ECR_LATEST_OPTIONAL_TAG }} - public.ecr.aws/n3n5b0s8/mansuf/mangadex-downloader:${{ github.ref_name }}-optional + + # public.ecr.aws/n3n5b0s8/mansuf/mangadex-downloader:${{ github.ref_name }} + + # - name: Build and push (with optional dependencies) + # uses: docker/build-push-action@v5 + # with: + # context: . + # file: Dockerfile.optional + # platforms: | + # linux/amd64 + # linux/arm64 + # linux/arm/v7 + # push: true + # tags: | + # ${{ env.AWS_ECR_LATEST_OPTIONAL_TAG }} + # public.ecr.aws/n3n5b0s8/mansuf/mangadex-downloader:${{ github.ref_name }}-optional windows-build: name: Build app & docs (Windows) diff --git a/Dockerfile b/Dockerfile index db5a4226..0f43832b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11 +FROM python:3.11-alpine COPY . /app WORKDIR /app