Skip to content

Commit

Permalink
Test ubuntu based image
Browse files Browse the repository at this point in the history
  • Loading branch information
reconman authored Jun 3, 2024
1 parent 460ca96 commit a755ceb
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Docker/PlexAniSync/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
FROM python:3.12 AS builder
ARG python_version=3.12

FROM ubuntu AS base
ARG python_version

RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python-${python_version} python3-pip && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
python3 -m pip install pip && \
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 1

FROM base AS builder

ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

RUN apt-get update && \
apt-get install -y \
build-essential \
rustc/testing \
rustc \
git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

Expand All @@ -18,7 +31,8 @@ RUN --mount=type=tmpfs,target=/root/.cargo \
CARGO_HOME=/root/.cargo \
pip install --user --no-warn-script-location -r requirements.txt

FROM python:3.12-slim
FROM base
ARG python_version

WORKDIR /plexanisync

Expand All @@ -27,7 +41,7 @@ COPY --from=builder /root/.local /root/.local
RUN chmod -R a+rX /root
# update PATH environment variable
ENV PATH=/root/.local:$PATH
ENV PYTHONPATH=/root/.local/lib/python3.11/site-packages
ENV PYTHONPATH=/root/.local/lib/python${python_version}/site-packages

ENV PLEX_SECTION=Anime \
PLEX_URL=http://127.0.0.1:32400 \
Expand Down

0 comments on commit a755ceb

Please sign in to comment.