mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-26 11:31:28 +08:00
Improve the devcontainer experience (#3492)
* Make it easier to run the devcontainer * Some more improvements * Tidy up few other things * Better name stages * Fix CI * Setup everything with one click * Allow to set IMAGE_OWNER * Change IMAGE_OWNER to IMAGE_REPO * Fix CI with IMAGE_REPO * Fix nodejs installation * Test devcontainer build as part of CI * Build devcontainer in its own job * Fix devcontainer cli installation * Fix devcontainer build * Fix devcontainer build in CI again * Enable buildkit only * Increase coverage of devcontainer test * Fix devcontainer start in CI * Ensure latest version of docker compose is used * Fix install compose action * Disable CI stuff which does not work until we fix them
This commit is contained in:
24
Makefile
24
Makefile
@@ -2,35 +2,33 @@ default_target: local
|
||||
|
||||
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
|
||||
VERSION = 0.12.0
|
||||
IMAGE_OWNER ?= ghcr.io/blakeblackshear/frigate
|
||||
CURRENT_UID := $(shell id -u)
|
||||
CURRENT_GID := $(shell id -g)
|
||||
|
||||
version:
|
||||
echo "VERSION=\"$(VERSION)-$(COMMIT_HASH)\"" > frigate/version.py
|
||||
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
|
||||
|
||||
local: version
|
||||
docker buildx build --tag frigate:latest --load .
|
||||
|
||||
build_web:
|
||||
docker run -e npm_config_cache=/web/.npm --volume ${PWD}/web:/web -w /web --group-add $(CURRENT_GID) -u $(CURRENT_UID):$(CURRENT_GID) node:16 /bin/bash -c "npm install && npm run build"
|
||||
|
||||
nginx_frigate:
|
||||
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate-nginx:1.0.2 --file docker/Dockerfile.nginx .
|
||||
|
||||
local:
|
||||
DOCKER_BUILDKIT=1 docker build -t frigate -f docker/Dockerfile .
|
||||
docker buildx build --target web-dist --output web/dist .
|
||||
|
||||
amd64:
|
||||
docker buildx build --platform linux/amd64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) --file docker/Dockerfile .
|
||||
docker buildx build --platform linux/amd64 --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
|
||||
|
||||
arm64:
|
||||
docker buildx build --platform linux/arm64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) --file docker/Dockerfile .
|
||||
docker buildx build --platform linux/arm64 --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
|
||||
|
||||
armv7:
|
||||
docker buildx build --platform linux/arm/v7 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) --file docker/Dockerfile .
|
||||
docker buildx build --platform linux/arm/v7 --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
|
||||
|
||||
build: version amd64 arm64 armv7
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) --file docker/Dockerfile .
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
|
||||
|
||||
push: build
|
||||
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag ghcr.io/blakeblackshear/frigate:${GITHUB_REF_NAME}-$(COMMIT_HASH) --file docker/Dockerfile .
|
||||
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) .
|
||||
|
||||
run_tests: frigate
|
||||
docker run --rm --entrypoint=python3 frigate:latest -u -m unittest
|
||||
|
Reference in New Issue
Block a user