init linker
This commit is contained in:
commit
bf3419a7f0
11 changed files with 4268 additions and 0 deletions
42
container/Containerfile
Normal file
42
container/Containerfile
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
From ubuntu:noble
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV PATH="/home/appuser/.local/bin:$PATH"
|
||||
ENV PATH="/home/appuser/.venv/bin:$PATH"
|
||||
ENV UV_CACHE_DIR="/app/.cache/uv"
|
||||
ENV UV_CACHE_DIR="/tmp/uv-cache"
|
||||
|
||||
RUN groupadd -g 10000 appgroup && \
|
||||
useradd -u 10000 -g appgroup -s /bin/bash -m appuser
|
||||
|
||||
RUN mkdir -p /tmp/uv-cache && chown -R appuser:appgroup /tmp/uv-cache
|
||||
|
||||
RUN apt-get update && \
|
||||
apt upgrade -y && \
|
||||
apt install -y curl && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
USER appuser
|
||||
|
||||
RUN mkdir -p /app/.cache && \
|
||||
chown -R appuser:appgroup /app
|
||||
|
||||
COPY --chmod=755 --chown=appuser:appgroup ./container/install-uv.sh /tmp/install-uv.sh
|
||||
RUN /tmp/install-uv.sh
|
||||
|
||||
COPY --chown=appuser:appgroup requirements.txt requirements.txt
|
||||
|
||||
RUN uv venv --python 3.12 /home/appuser/.venv && \
|
||||
. /home/appuser/.venv/bin/activate && \
|
||||
uv pip install -r requirements.txt
|
||||
|
||||
COPY --chown=appuser:appgroup templates templates
|
||||
COPY --chown=appuser:appgroup static static
|
||||
COPY --chown=appuser:appgroup linker.py linker.py
|
||||
COPY --chown=appuser:appgroup version version
|
||||
RUN chmod +x linker.py
|
||||
|
||||
CMD /app/linker.py
|
||||
|
||||
2024
container/install-uv.sh
Executable file
2024
container/install-uv.sh
Executable file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue