mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
f96055a33f
* 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
|