Skip to content

Commit

Permalink
Revert "adds proper image building with alpine and PUID and PGID (#15)…
Browse files Browse the repository at this point in the history
…" (#16)

This reverts commit 258c50a.
  • Loading branch information
speedyconzales authored May 2, 2024
1 parent 258c50a commit 1f52d88
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
docker buildx build --push \
--tag docker.io/speedyconzales/series-scraper:latest \
--tag ghcr.io/speedyconzales/series-scraper:latest \
--platform linux/amd64,linux/arm64 .
--platform linux/amd64,linux/arm/v7,linux/arm64 .
- name: Setup tmate session
if: failure()
timeout-minutes: 10
Expand Down
30 changes: 13 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
# Stage 1: Checkout repository and prepare environment
FROM ghcr.io/linuxserver/baseimage-alpine:edge AS builder
FROM python:3.12.3-slim-bookworm AS builder

# Set the working directory
WORKDIR /app
WORKDIR /series-scraper

# Install git and git-lfs for cloning the repository
RUN apk update && apk add git git-lfs
RUN apt-get update && apt-get install -y git git-lfs
RUN git lfs install

# Copy the current directory contents into the container at /
RUN git clone https://github.com/speedyconzales/series-scraper.git /app
RUN git clone https://github.com/speedyconzales/series-scraper.git /series-scraper

RUN mv template.yml config.yml

# Stage 2: Final setup
FROM ghcr.io/linuxserver/baseimage-alpine:edge
FROM python:3.12.3-slim-bookworm AS final
LABEL org.opencontainers.image.source="https://github.com/speedyconzales/seroes-scraper"

WORKDIR /app
WORKDIR /series-scraper

RUN apk update

# Install Python 3
RUN apk add --no-cache python3=~3.12 py3-pip

COPY --from=builder /app /app
COPY --from=builder /series-scraper /series-scraper

# Install any needed packages specified in requirements.txt
RUN python3 -m pip install -r requirements.txt --break-system-packages
RUN pip install -r requirements.txt

# Install Chromium
RUN apk add --no-cache chromium
RUN apt-get update && apt-get install -y chromium

# Install Chromium driver
RUN apk add --no-cache chromium-chromedriver
RUN apt-get install -y chromium-driver

# Install FFmpeg
RUN apk add --no-cache ffmpeg
RUN apt-get install -y ffmpeg

#ENTRYPOINT ["/bin/sh", "-c", "exec /init; python3 /app/main.py"]
# Set main.py as entrypoint
ENTRYPOINT ["python", "main.py"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
## Usage
1. if you are familiar with docker just use:
1. `docker pull speedyconzales/series-scraper`
2. `docker run --rm -e PUID=<your_user_id> -e PGID=<your_group_id> -v <path-to-your-anime-folder>:/app/anime -v <path-to-your-series-folder>:/app/series speedyconzales/series-scraper s6-setuidgid abc python main.py` followed by the arguments you want to provide
2. `docker run --rm -v <path-to-your-anime-folder>:/series-scraper/anime -v <path-to-your-series-folder>:/series-scraper/series speedyconzales/series-scraper` followed by the arguments you want to provide
2. if you don't want to use docker or there is no suitable docker image available for your architecture, you can use the following steps to run the scraper:
1. clone the repository
2. install the dependencies
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
series-scraper:
container_name: series-scraper
image: speedyconzales/series-scraper
volumes:
- ./Animes:/series-scraper/Animes
- ./Series:/series-scraper/Series

0 comments on commit 1f52d88

Please sign in to comment.