Update Docker build process in Makefile
- Added build arguments for BUILD_DATE, VCS_REF, and VERSION to the docker build command for improved image metadata.
This commit is contained in:
6
Makefile
6
Makefile
@@ -63,7 +63,11 @@ build-freebsd-amd64:
|
||||
GOOS=freebsd GOARCH=amd64 go build -o $(BUILD_DIR)/$(BINARY_NAME)-freebsd-amd64 main.go
|
||||
|
||||
docker-build:
|
||||
docker build -t $(BINARY_NAME) .
|
||||
docker build \
|
||||
--build-arg BUILD_DATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ') \
|
||||
--build-arg VCS_REF=$(shell git rev-parse --short HEAD) \
|
||||
--build-arg VERSION=$(shell node -p "require('./package.json').version") \
|
||||
-t $(BINARY_NAME) .
|
||||
|
||||
docker-run:
|
||||
docker run -p 8080:8080 $(BINARY_NAME)
|
||||
|
||||
Reference in New Issue
Block a user