1
0

Makefile 540 B

123456789101112131415
  1. DOCKER_IMAGE_NAME := fphammerle/systemctl-mqtt
  2. DOCKER_TAG_VERSION := $(shell git describe --match=v* --dirty | sed -e 's/^v//')
  3. ARCH := $(shell arch)
  4. DOCKER_TAG_ARCH_SUFFIX_armv6l := armv6
  5. DOCKER_TAG_ARCH_SUFFIX_x86_64 := amd64
  6. DOCKER_TAG_ARCH_SUFFIX = ${DOCKER_TAG_ARCH_SUFFIX_${ARCH}}
  7. DOCKER_TAG = ${DOCKER_TAG_VERSION}-${DOCKER_TAG_ARCH_SUFFIX}
  8. .PHONY: docker-build docker-push
  9. docker-build:
  10. sudo docker build -t "${DOCKER_IMAGE_NAME}:${DOCKER_TAG}" .
  11. docker-push: docker-build
  12. sudo docker push "${DOCKER_IMAGE_NAME}:${DOCKER_TAG}"