mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-26 10:57:40 +00:00
.devcontainer
devcontainer.json
postCreateCommand.sh
.devops
.github
.vscode
InvenTree
ci
contrib
deploy
docker
docs
images
src
.deepsource.toml
.eslintrc.yml
.gitattributes
.gitignore
.pkgr.yml
.pre-commit-config.yaml
CONTRIBUTING.md
Dockerfile
LICENSE
Procfile
README.md
RELEASE.md
SECURITY.md
backportrc.json
crowdin.yml
docker-compose.yml
docker.dev.env
package-lock.json
package.json
pyproject.toml
readthedocs.yml
requirements-dev.in
requirements-dev.txt
requirements.in
requirements.txt
runtime.txt
tasks.py
yarn.lock
* Make base image configurable * Refactor dockerfile - Place extra packages into extra shell script - Add pre-build stage where packages are installed, and then cache removed - Run same script in dev target, but do not remove * Run docker workflow whenever package requirements change * Replace devcontainer dockerfile * Install base packages in devcontainer * --no-cache-dir
25 lines
658 B
Bash
Executable File
25 lines
658 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Avoiding Dubious Ownership in Dev Containers for setup commands that use git
|
|
# Note that the local workspace directory is passed through as the first argument $1
|
|
git config --global --add safe.directory $1
|
|
|
|
# create folders
|
|
mkdir -p $1/dev/{commandhistory,plugins}
|
|
cd $1
|
|
|
|
# create venv
|
|
python3 -m venv $1/dev/venv
|
|
. $1/dev/venv/bin/activate
|
|
|
|
# setup InvenTree server
|
|
pip install invoke
|
|
invoke update
|
|
invoke setup-dev
|
|
invoke frontend-install
|
|
|
|
# remove existing gitconfig created by "Avoiding Dubious Ownership" step
|
|
# so that it gets copied from host to the container to have your global
|
|
# git config in container
|
|
rm -f /home/vscode/.gitconfig
|