Add Containerfile
parent
4516fe954c
commit
9c6913ffd0
|
@ -0,0 +1,4 @@
|
||||||
|
*
|
||||||
|
!.git
|
||||||
|
!pyproject.toml
|
||||||
|
!updatebot.py
|
|
@ -0,0 +1,43 @@
|
||||||
|
FROM git.pyrocufflink.net/containerimages/dch-base AS build
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=/var/cache \
|
||||||
|
microdnf install -y \
|
||||||
|
--setopt=install_weak_deps=0 \
|
||||||
|
git-core \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3-wheel \
|
||||||
|
&& :
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN python3 -m pip wheel .
|
||||||
|
|
||||||
|
|
||||||
|
FROM git.pyrocufflink.net/containerimages/dch-base
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=/var/cache \
|
||||||
|
microdnf install -y \
|
||||||
|
--setopt=install_weak_deps=0 \
|
||||||
|
git-core \
|
||||||
|
python3 \
|
||||||
|
&& echo bot:x:25167:25167:bot:/home/bot:/bin/bash >> /etc/passwd \
|
||||||
|
&& echo bot:x:25167: >> /etc/group \
|
||||||
|
&& :
|
||||||
|
|
||||||
|
RUN --mount=type=bind,src=/app,dst=/build,from=build \
|
||||||
|
python3 -m venv /app \
|
||||||
|
&& /app/bin/python3 -m pip install --no-index -f /build updatebot \
|
||||||
|
&& :
|
||||||
|
|
||||||
|
USER 25167:25167
|
||||||
|
|
||||||
|
ENTRYPOINT ["/app/bin/updatebot"]
|
||||||
|
|
||||||
|
LABEL \
|
||||||
|
license=0BSD \
|
||||||
|
vendor='Dustin C. Hatch' \
|
||||||
|
version='0' \
|
||||||
|
name=updatebot
|
Loading…
Reference in New Issue