meme / Dockerfile
wuliya's picture
build(Dockerfile): 更新字体安装方法并优化环境配置
b5ae3bb unverified
raw
history blame contribute delete
872 Bytes
FROM ghcr.io/astral-sh/uv:debian-slim
RUN apt update && \
apt install --no-install-recommends -y \
git \
curl \
libgl1 \
libegl1 \
libglx-mesa0 \
fontconfig \
gettext \
ca-certificates \
fonts-noto-color-emoji \
libegl1-mesa && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
apt-get clean all
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
RUN git clone --depth=1 https://github.com/CandriaJS/meme-generator .
RUN mkdir -p $HOME/.local/share/fonts/meme && \
cp ./resources/fonts/* $HOME/.local/share/fonts/meme/ && \
fc-cache -fv
COPY config.toml $HOME/.config/meme_generator/config.toml
RUN uv python install 3.12
ENV PATH="$HOME/app/.venv/bin:$PATH"
RUN uv sync --locked --no-dev
EXPOSE 2244
CMD ["uv", "run", "meme", "start"]