- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
Latest commit
22 lines (17 loc) · 625 Bytes
/
Copy pathMakefile
File metadata and controls
22 lines (17 loc) · 625 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Include the environment variables
include ./.env
FOLDER_CLEAN := $(subst ",,$(FOLDER))
# Run the Docker image and attach the environment file
docker_run: docker_build
docker run --rm --name github-backup --mount type=bind,src="$(FOLDER_CLEAN)",target=/usr/src/backup --env-file ./.env github-backup
# Build the Docker image
docker_build: docker_cleanup
docker build -t github-backup .
# Cleanup Docker
docker_cleanup: docker_start
docker stop github-backup ||true
docker rm github-backup ||true
# Start the Docker Daemon
docker_start:
open -a Docker &&\
while! docker info > /dev/null 2>&1;do sleep 1;done