Harden a bit, update some sections, add a README section

This commit is contained in:
Ian McEwen
2026-05-31 15:45:02 -07:00
parent 77db30125a
commit b16441378e
4 changed files with 47 additions and 18 deletions

View File

@@ -7,18 +7,24 @@ ARG TARGET_ARCH="library"
FROM docker.io/${TARGET_ARCH}/python:${TARGET_VERSION}
WORKDIR /usr/local/app
WORKDIR /tmp/build
COPY . /usr/local/app
COPY . /tmp/build
RUN _poetry_venv_dir="$(mktemp -d -p "${TMPDIR:-/tmp}" 'poetry_venv.XXXXXX')" && \
python -m 'venv' "${_poetry_venv_dir}" && \
"${_poetry_venv_dir}/bin/pip" install 'poetry' && \
"${_poetry_venv_dir}/bin/pip" install --no-cache-dir 'poetry' && \
"${_poetry_venv_dir}/bin/poetry" config --local virtualenvs.create false && \
"${_poetry_venv_dir}/bin/poetry" install && \
"${_poetry_venv_dir}/bin/poetry" install --without dev --extras cli --extras tunnel --no-interaction --no-ansi && \
addgroup -S meshtastic && \
adduser -S -G meshtastic -h /home/meshtastic meshtastic && \
rm -f -r "${_poetry_venv_dir}" && \
rm -f -r "/usr/local/app"
rm -f -r "/tmp/build"
COPY "./bin/container-entrypoint.sh" "/init"
RUN chmod 0755 /init
WORKDIR /home/meshtastic
USER meshtastic
ENTRYPOINT [ "/init" ]