-
Notifications
You must be signed in to change notification settings - Fork 324
Expand file tree
/
Copy pathContainerfile.debian
More file actions
29 lines (21 loc) · 936 Bytes
/
Containerfile.debian
File metadata and controls
29 lines (21 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 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 /tmp/build
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 --no-cache-dir 'poetry' && \
"${_poetry_venv_dir}/bin/poetry" config --local virtualenvs.create false && \
"${_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 "/tmp/build"
COPY "./bin/container-entrypoint.sh" "/init"
RUN chmod 0755 /init
WORKDIR /home/meshtastic
USER meshtastic
ENTRYPOINT [ "/init" ]