mirror of
https://github.com/meshtastic/python.git
synced 2026-06-03 05:05:46 -04:00
Harden a bit, update some sections, add a README section
This commit is contained in:
@@ -7,18 +7,23 @@ 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 --no-directory && \
|
||||
"${_poetry_venv_dir}/bin/poetry" install --without dev --extras cli --extras tunnel --no-interaction --no-ansi && \
|
||||
useradd --system --create-home --home-dir /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" ]
|
||||
|
||||
Reference in New Issue
Block a user