~kdsch/containerized-build

542ee4dd93cf7834a0ecf03c149af6ff843332a0 — Karl Schultheisz 23 days ago 86f5ae6 master
envsetup.sh: let WORKDIR=$PWD

This seems to work. It has the advantage that the paths within the
container are the same as those outside the container. This avoids
breaking the language server (clangd) that runs outside the container.
1 files changed, 5 insertions(+), 1 deletions(-)

M envsetup.sh
M envsetup.sh => envsetup.sh +5 -1
@@ 6,11 6,15 @@ build_container_image() {
	podman build -t build-environment:$(hash) .
}

WORKDIR=$PWD

podman_wrapper() {
	podman run \
		--pull=never \
		--rm \
		--volume=.:/home/root build-environment:$(hash) \
		--volume=.:$WORKDIR \
		--workdir=$WORKDIR \
		build-environment:$(hash) \
		$@
}