keeping alpine for now, primary is debian-based again

This commit is contained in:
kappa118 2025-03-02 09:54:04 -05:00
parent c887192d86
commit 1c08c71b47
2 changed files with 90 additions and 28 deletions

View file

@ -1,28 +1,35 @@
FROM alpine
FROM python:3.13-slim
ENV PATH="/dispatcharrpy/bin:$PATH" \
VIRTUAL_ENV=/dispatcharrpy \
DJANGO_SETTINGS_MODULE=dispatcharr.settings \
PYTHONUNBUFFERED=1
RUN apk add \
python3 \
python3-dev \
gcc \
musl-dev \
linux-headers \
py3-pip \
RUN apt-get update && \
apt-get install -y \
curl \
ffmpeg \
streamlink \
vlc \
libpq-dev \
gcc \
py3-virtualenv \
uwsgi \
uwsgi-python \
nodejs \
npm \
git \
gpg \
libpq-dev \
lsb-release \
python3-virtualenv \
streamlink \
uwsgi
RUN \
curl -sL https://deb.nodesource.com/setup_23.x -o /tmp/nodesource_setup.sh && \
bash /tmp/nodesource_setup.sh && \
curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg && \
chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list && \
apt-get update && \
apt-get install -y redis
RUN apt-get update && \
apt-get install -y \
nodejs \
redis
RUN \
@ -30,24 +37,25 @@ RUN \
virtualenv /dispatcharrpy && \
git clone https://github.com/Dispatcharr/Dispatcharr /app && \
cd /app && \
/dispatcharrpy/bin/pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir -r requirements.txt && \
cd /app/frontend && \
npm install && \
npm run build && \
find . -maxdepth 1 ! -name '.' ! -name 'build' -exec rm -rf '{}' \; && \
cd /app && \
python manage.py collectstatic --noinput || true
# Cleanup
RUN \
apk del \
nodejs \
npm \
git \
python manage.py collectstatic --noinput || true && \
apt-get remove -y \
gcc \
musl-dev \
python3-dev \
linux-headers
git \
gpg \
libpq-dev \
lsb-release \
nodejs && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
WORKDIR /app

54
docker/Dockerfile.alpine Normal file
View file

@ -0,0 +1,54 @@
FROM alpine
ENV PATH="/dispatcharrpy/bin:$PATH" \
VIRTUAL_ENV=/dispatcharrpy \
DJANGO_SETTINGS_MODULE=dispatcharr.settings \
PYTHONUNBUFFERED=1
RUN apk add \
python3 \
python3-dev \
gcc \
musl-dev \
linux-headers \
py3-pip \
ffmpeg \
streamlink \
vlc \
libpq-dev \
gcc \
py3-virtualenv \
uwsgi \
uwsgi-python \
nodejs \
npm \
git \
redis
RUN \
mkdir /data && \
virtualenv /dispatcharrpy && \
git clone https://github.com/Dispatcharr/Dispatcharr /app && \
cd /app && \
/dispatcharrpy/bin/pip install --no-cache-dir -r requirements.txt && \
cd /app/frontend && \
npm install && \
npm run build && \
find . -maxdepth 1 ! -name '.' ! -name 'build' -exec rm -rf '{}' \; && \
cd /app && \
python manage.py collectstatic --noinput || true
# Cleanup
RUN \
apk del \
nodejs \
npm \
git \
gcc \
musl-dev \
python3-dev \
linux-headers
WORKDIR /app
CMD ["/app/docker/entrypoint.aio.sh"]