diff --git a/Makefile b/Makefile deleted file mode 100644 index b520834..0000000 --- a/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -include make.env - -BUILD_DATE ?= $(shell date -u +%Y-%m-%dT%H%M%SZ) - -.PHONY: push push-latest run rm help vars shell prune - -## all : Build all platforms -all: Dockerfile - docker buildx build -t $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) $(PLATFORMS) --build-arg VERSION=$(VERSION) --build-arg CHECKSUM=$(CHECKSUM) --build-arg BUILD_DATE=$(BUILD_DATE) -f Dockerfile . - -## build : build the current platform (default) -build: Dockerfile - docker buildx build -t $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) --build-arg VERSION=$(VERSION) --build-arg CHECKSUM=$(CHECKSUM) --build-arg BUILD_DATE=$(BUILD_DATE) -f Dockerfile . - -## build-latest : Build the latest current platform -build-latest: Dockerfile - docker buildx build -t $(NS)/$(IMAGE_NAME):latest --build-arg VERSION=$(VERSION) --build-arg CHECKSUM=$(CHECKSUM) --build-arg BUILD_DATE=$(BUILD_DATE) -f Dockerfile . - -## checksum : Get the checksum of a file -checksum: - wget -qO- "https://github.com/$(IMAGE_NAME)/$(IMAGE_NAME)/releases/download/v${VERSION}/Leantime-v${VERSION}.tar.gz" | sha256sum - -## date : Check the image date -date: - docker exec -it $(CONTAINER_NAME)-$(CONTAINER_INSTANCE) date - -## lint : Lint the Dockerfile with hadolint -lint: Dockerfile - hadolint Dockerfile && yamllint . - -## load : Load the release image -load: Dockerfile - docker buildx build -t $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) --build-arg VERSION=$(VERSION) --build-arg CHECKSUM=$(CHECKSUM) --build-arg BUILD_DATE=$(BUILD_DATE) -f Dockerfile --load . - -## load-latest : Load the latest image -load-latest: Dockerfile - docker buildx build -t $(NS)/$(IMAGE_NAME):latest --build-arg VERSION=$(VERSION) --build-arg CHECKSUM=$(CHECKSUM) --build-arg BUILD_DATE=$(BUILD_DATE) -f Dockerfile --load . - -## monitor : Monitor the image with snyk -monitor: - snyk container monitor $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) - -## prune : Prune the docker builder -prune: - docker builder prune --all - -## push : Push the release image -push: Dockerfile - docker buildx build -t $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) --build-arg VERSION=$(VERSION) --build-arg BUILD_DATE=$(BUILD_DATE) -f Dockerfile --push . - -## push-latest : PUsh the latest image -push-latest: Dockerfile - docker buildx build -t $(NS)/$(IMAGE_NAME):latest $(PLATFORMS) --build-arg VERSION=$(VERSION) --build-arg BUILD_DATE=$(BUILD_DATE) -f Dockerfile --push . - -## push-all : Push all release platform images -push-all: Dockerfile - docker buildx build -t $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) $(PLATFORMS) --build-arg VERSION=$(VERSION) -f Dockerfile --push . - -## rm : Remove the container -rm: stop - docker rm $(CONTAINER_NAME)-$(CONTAINER_INSTANCE) - -## run : Run the Docker image -run: - docker run --rm --name $(CONTAINER_NAME)-$(CONTAINER_INSTANCE) $(PORTS) $(ENV) $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) - -## rund : Run the Docker image in the background -rund: - docker run -d --rm --name $(CONTAINER_NAME)-$(CONTAINER_INSTANCE) $(PORTS) $(ENV) $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) - -shell: - docker run --rm -it $(PORTS) $(ENV) $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) /bin/ash - -## stop : Stop the Docker container -stop: - docker stop $(CONTAINER_NAME)-$(CONTAINER_INSTANCE) - -## test : Test the image with snyk -test: - snyk container test $(NS)/$(IMAGE_NAME):$(VERSION)-ls$(LS) --file=Dockerfile - -## help : Show help -help: Makefile - @sed -n 's/^##//p' $< - -## vars : Show all variables -vars: - @printf "VERSION : %s\n" "$(VERSION)" - @printf "NS : %s\n" "$(NS)" - @printf "IMAGE_NAME : %s\n" "$(IMAGE_NAME)" - @printf "CONTAINER_NAME :%s\n" " $(CONTAINER_NAME)" - @printf "CONTAINER_INSTANCE : %s\n" "$(CONTAINER_INSTANCE)" - @printf "PORTS : %s\n" "$(PORTS)" - @printf "ENV : %s\n" "$(ENV)" - @echo "PLATFORMS : $(PLATFORMS)" - -default: build diff --git a/make.env b/make.env deleted file mode 100644 index c720127..0000000 --- a/make.env +++ /dev/null @@ -1,20 +0,0 @@ -VERSION=2.1.7 -LS=5 -NS=nicholaswilde -CHECKSUM=3a5e0cb794cf2dc6c97b32ffad4ccdfbb84d3e987e910c5d3fef686e7ac2463f - -IMAGE_NAME=leantime -CONTAINER_NAME=leantime -CONTAINER_INSTANCE=default - -ENV=-e TZ=America/Los_Angeles \ - -e LEAN_DB_HOST=mysql_leantime \ - -e LEAN_DB_USER=admin \ - -e LEAN_DB_PASSWORD=321.qwerty \ - -e LEAN_DB_DATABASE=leantime - -# Run -PORTS=-p 80:80 -p 9000:9000 - -# Build -PLATFORMS=--platform linux/arm/v7,linux/arm64,linux/amd64