Open
Description
Hi,
the Dockerfile could look like this:
FROM python:3.9-alpine
ARG USER=copier
ARG GROUP=copier
ARG UID=1000
ARG GID=1000
RUN addgroup -g "${GID}" "${GROUP}" && \
adduser -h /home/"${USER}" -u "${UID}" -G "${GROUP}" -s /bin/bash -D "${USER}"
RUN set -ex; \
apk add --no-cache --virtual .build-deps \
gcc \
musl-dev; \
apk add --no-cache \
bash \
git \
py3-virtualenv;
USER "${USER}"
ENV PATH=/home/${USER}/.local/bin:$PATH
RUN set -ex; \
python3 -m pip install --user pipx; \
pipx install copier; \
pipx install invoke; \
pipx install pre-commit; \
pipx ensurepath;
USER root
RUN set -ex; \
apk del .build-deps;
USER "${USER}"
ENTRYPOINT ["copier"]
I already built it and performed a few tests, it works pretty good.
It would be also nice to have a wrapper script to parse arguments and automatically mount template and output directories as volumes...
What do you think about?