File: Makefile

package info (click to toggle)
amqtt 0.11.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,660 kB
  • sloc: python: 14,565; sh: 42; makefile: 34; javascript: 27
file content (37 lines) | stat: -rw-r--r-- 784 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Image name and tag
IMAGE_NAME := amqtt
IMAGE_TAG := latest
VERSION_TAG := 0.11.3
REGISTRY := amqtt/$(IMAGE_NAME)

# Platforms to build for
PLATFORMS := linux/amd64,linux/arm64

# Default target
.PHONY: all
all: build

# Build multi-platform image
.PHONY: build
build:
	docker buildx build \
		--platform $(PLATFORMS) \
		--tag $(REGISTRY):$(IMAGE_TAG) \
		--tag $(REGISTRY):$(VERSION_TAG) \
		--file Dockerfile \
		--push .

# Optional: build without pushing (for local testing)
.PHONY: build-local
build-local:
	docker buildx build \
		--tag $(REGISTRY):$(IMAGE_TAG) \
		--tag $(REGISTRY):$(VERSION_TAG) \
		--file Dockerfile \
		--load .

# Create builder if not exists
.PHONY: init
init:
	docker buildx create --use --name multi-builder || true
	docker buildx inspect --bootstrap