mirror of
https://github.com/meshtastic/python.git
synced 2026-06-02 12:45:00 -04:00
Container: Add initial container for meshtastic-cli
Just a quick set of files to enable the build of (tagged) containers. Both alpine and debian containers are available (~200MiB/~1.2GiB) allowing us to use meshtastic cli with a quick docker run, instead of having to build/install stuff locally. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
This commit is contained in:
24
Containerfile.debian
Normal file
24
Containerfile.debian
Normal file
@@ -0,0 +1,24 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# Copyright (C) 2025 Olliver Schinagl <oliver@schinagl.nl>
|
||||
|
||||
ARG TARGET_VERSION="3.11"
|
||||
ARG TARGET_ARCH="library"
|
||||
|
||||
FROM docker.io/${TARGET_ARCH}/python:${TARGET_VERSION}
|
||||
|
||||
WORKDIR /usr/local/app
|
||||
|
||||
COPY . /usr/local/app
|
||||
|
||||
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/poetry" config --local virtualenvs.create false && \
|
||||
"${_poetry_venv_dir}/bin/poetry" install --no-directory && \
|
||||
rm -f -r "${_poetry_venv_dir}" && \
|
||||
rm -f -r "/usr/local/app"
|
||||
|
||||
COPY "./bin/container-entrypoint.sh" "/init"
|
||||
|
||||
ENTRYPOINT [ "/init" ]
|
||||
Reference in New Issue
Block a user