-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds proper image building with debian and PUID and PGID (#17)
- Loading branch information
1 parent
1f52d88
commit 4d98a63
Showing
11 changed files
with
40 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.git/ | ||
.DS_Store | ||
*.mp4 | ||
.idea/ | ||
.vscode/ | ||
downloaded_files/ | ||
.github/ | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
test/ | ||
config.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,14 @@ | ||
# Stage 1: Checkout repository and prepare environment | ||
FROM python:3.12.3-slim-bookworm AS builder | ||
FROM ghcr.io/linuxserver/baseimage-debian:bookworm | ||
LABEL org.opencontainers.image.source="https://github.com/speedyconzales/series-scraper" | ||
|
||
# Set the working directory | ||
WORKDIR /series-scraper | ||
WORKDIR /app | ||
|
||
# Install git and git-lfs for cloning the repository | ||
RUN apt-get update && apt-get install -y git git-lfs | ||
RUN git lfs install | ||
COPY . /app/ | ||
|
||
# Copy the current directory contents into the container at / | ||
RUN git clone https://github.com/speedyconzales/series-scraper.git /series-scraper | ||
COPY root/ / | ||
|
||
RUN mv template.yml config.yml | ||
RUN chmod +x /etc/s6-overlay/s6-rc.d/init-series-scraper-config/run | ||
|
||
# Stage 2: Final setup | ||
FROM python:3.12.3-slim-bookworm AS final | ||
LABEL org.opencontainers.image.source="https://github.com/speedyconzales/seroes-scraper" | ||
RUN apt-get update && apt-get install -y chromium chromium-driver ffmpeg python3.11-full python3-pip | ||
|
||
WORKDIR /series-scraper | ||
|
||
COPY --from=builder /series-scraper /series-scraper | ||
|
||
# Install any needed packages specified in requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# Install Chromium | ||
RUN apt-get update && apt-get install -y chromium | ||
|
||
# Install Chromium driver | ||
RUN apt-get install -y chromium-driver | ||
|
||
# Install FFmpeg | ||
RUN apt-get install -y ffmpeg | ||
|
||
# Set main.py as entrypoint | ||
ENTRYPOINT ["python", "main.py"] | ||
RUN python3 -m pip install -r requirements.txt --break-system-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
if [[ ! -f /app/config.yml ]]; then | ||
mv /app/template.yml /app/config.yml | ||
fi | ||
# permissions | ||
lsiown -R abc:abc /app | ||
lsiown -R abc:abc /usr/local/lib/python3.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/init-series-scraper-config/run |
Empty file.