2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-07-04 06:00:38 +00:00
Files
InvenTree/.devcontainer/Dockerfile
T
Matthias Mair de736ee5de !feat(backend): bump minimum python version (#12223)
* bump ci versions

* bump installer version

* bump tooling version ref

* bump doc refs

* bump / refactor code refs

* bump debug ref

* remove now unneeded deps

* bump release version

* remove distutils

* fix finder call

* remove old compat code

* add changelog entry

* lower cov target for now
2026-06-24 17:42:35 +10:00

49 lines
1.6 KiB
Docker

# Dockerfile for the InvenTree devcontainer
# In contrast with the "production" image (which is based on an Alpine image)
# we use a Debian-based image for the devcontainer
FROM mcr.microsoft.com/devcontainers/python:3.12-trixie@sha256:5440cb68898d190ad6c6e8a4634ce89d0645bea47f9c8beb75612bb8e3983711
# InvenTree paths
ENV INVENTREE_HOME="/home/inventree"
ENV INVENTREE_DATA_DIR="${INVENTREE_HOME}/dev"
ENV INVENTREE_STATIC_ROOT="${INVENTREE_DATA_DIR}/static"
ENV INVENTREE_MEDIA_ROOT="${INVENTREE_DATA_DIR}/media"
ENV INVENTREE_BACKUP_DIR="${INVENTREE_DATA_DIR}/backup"
ENV INVENTREE_PLUGIN_DIR="${INVENTREE_DATA_DIR}/plugins"
ENV INVENTREE_CONFIG_FILE="${INVENTREE_DATA_DIR}/config.yaml"
ENV INVENTREE_SECRET_KEY_FILE="${INVENTREE_DATA_DIR}/secret_key.txt"
ENV INVENTREE_OIDC_PRIVATE_KEY_FILE="${INVENTREE_DATA_DIR}/oidc.pem"
# Required for running playwright within devcontainer
ENV DISPLAY=:0
ENV LIBGL_ALWAYS_INDIRECT=1
COPY contrib/container/init.sh ./
RUN chmod +x init.sh
# Install required base packages
RUN apt update && apt install -y \
python3.12-dev python3.12-venv \
postgresql-client \
libldap2-dev libsasl2-dev \
libpango1.0-0 libcairo2 \
poppler-utils weasyprint
# Install packages required for frontend development
RUN apt install -y nodejs npm
# Update to the latest stable node version
RUN npm install -g n --ignore-scripts && n lts
# Install yarn
RUN npm install -g yarn
# Ensure node and yarn are available at the command line
RUN node --version && yarn --version
RUN yarn config set httpTimeout 600000 --home
ENTRYPOINT ["/bin/bash", "./init.sh"]