IMAGE_NAME ?= reconcile-rs-dev-container
WORKDIR_MOUNT ?= $(shell pwd):/workspace
.PHONY: build dev dc-up dc-rebuild
build:
docker build -f .devcontainer/Dockerfile.dev -t $(IMAGE_NAME) .
dev: build
docker run --rm -it \
--entrypoint bash \
-e GIT_AUTHOR_NAME="$(shell git config --global user.name)" \
-e GIT_AUTHOR_EMAIL="$(shell git config --global user.email)" \
-v $(WORKDIR_MOUNT) \
-w /workspace \
$(IMAGE_NAME) \
-lc "\
chmod +x .devcontainer/init.sh && \
.devcontainer/init.sh create && \
.devcontainer/init.sh start && \
exec bash \
"
dc-up:
GIT_AUTHOR_NAME="$$(git config --global user.name)" \
GIT_AUTHOR_EMAIL="$$(git config --global user.email)" \
devcontainer up
dc-rebuild:
GIT_AUTHOR_NAME="$$(git config --global user.name)" \
GIT_AUTHOR_EMAIL="$$(git config --global user.email)" \
devcontainer rebuild