forked from nighthawk-apps/zcash-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (19 loc) · 735 Bytes
/
Copy pathMakefile
File metadata and controls
24 lines (19 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
DOCKER_IMAGE_NAME = zbe
DOCKER_CONTAINER_NAME = zbe
DOCKER_GHCR_IMAGE_NAME = ghcr.io/nighthawk-apps/zcash-explorer
.PHONY: docker_build docker_run docker_clean docker_publish
# Build the Docker image
docker_build:
docker build -t $(DOCKER_IMAGE_NAME) .
# Run the Docker container
docker_run:
docker run -d --name $(DOCKER_CONTAINER_NAME) $(DOCKER_IMAGE_NAME)
# Clean Docker resources (stop and remove the container, remove the image)
docker_clean:
-docker stop $(DOCKER_CONTAINER_NAME)
-docker rm $(DOCKER_CONTAINER_NAME)
-docker rmi $(DOCKER_IMAGE_NAME)
# Publish the Docker image to GitHub Container Registry
docker_publish:
docker tag $(DOCKER_IMAGE_NAME) $(DOCKER_GHCR_IMAGE_NAME)
docker push $(DOCKER_GHCR_IMAGE_NAME)