dockerfile updated for faster build, local docker make target added

This commit is contained in:
pseusys
2023-02-11 17:27:21 +01:00
parent cccf1f7305
commit 1dd40197e3
2 changed files with 7 additions and 7 deletions

View File

@@ -7,8 +7,8 @@ WORKDIR ./waka-readme-stats
ADD requirements.txt ./requirements.txt
ADD Makefile ./Makefile
ADD sources/* ./
RUN make dependencies
ADD sources/* ./
ENTRYPOINT python3 ./main.py

View File

@@ -30,16 +30,16 @@ dependencies: venv node_modules
.PHONY: dependencies
run: dependencies
run-locally: dependencies
@ # Run action locally
source <(cat .env.example | sed 's/=/=/' | sed 's/^/export /') && python3 ./sources/main.py
.PHONY: run
.PHONY: run-locally
image:
@ # Build docker image
run-container:
@ # Run action in container
docker build -t waka-readme-stats -f Dockerfile .
.PHONY: image
docker run --env-file .env.example waka-readme-stats
.PHONY: run-container
clean: