Dockerfile: Allow building docker images locally for different editions (#63893)
* Allow to build different editions from dockerfile * Fix missing argument on dockerfile
This commit is contained in:
@@ -165,19 +165,35 @@ shellcheck: $(SH_FILES) ## Run checks for shell scripts.
|
||||
|
||||
##@ Docker
|
||||
|
||||
TMP_DIR!=mktemp -d
|
||||
TAG_SUFFIX=$(if $(WIRE_TAGS)!=oss,-$(WIRE_TAGS))
|
||||
PLATFORM=linux/amd64
|
||||
|
||||
build-docker-full: ## Build Docker image for development.
|
||||
@echo "build docker container"
|
||||
cp -Lrf . $(TMP_DIR)
|
||||
DOCKER_BUILDKIT=1 \
|
||||
docker build \
|
||||
--tag grafana/grafana:dev .
|
||||
docker build $(TMP_DIR) \
|
||||
--platform $(PLATFORM) \
|
||||
--build-arg BINGO=false \
|
||||
--build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \
|
||||
--build-arg WIRE_TAGS=$(WIRE_TAGS) \
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
|
||||
build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
|
||||
@echo "build docker container"
|
||||
cp -Lrf . $(TMP_DIR)
|
||||
DOCKER_BUILDKIT=1 \
|
||||
docker build \
|
||||
docker build $(TMP_DIR) \
|
||||
--platform $(PLATFORM) \
|
||||
--build-arg BINGO=false \
|
||||
--build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \
|
||||
--build-arg WIRE_TAGS=$(WIRE_TAGS) \
|
||||
--build-arg BASE_IMAGE=ubuntu:20.04 \
|
||||
--build-arg GO_IMAGE=golang:1.20.1 \
|
||||
--tag grafana/grafana:dev-ubuntu .
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev-ubuntu \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
|
||||
##@ Services
|
||||
|
||||
|
||||
Reference in New Issue
Block a user