forked from stellar/go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
20 lines (16 loc) · 774 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Check if we need to prepend docker commands with sudo
SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo")
# If TAG is not provided set default value
TAG ?= stellar/ticker:$(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty-$(shell id -u -n))
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
BUILD_DATE := $(shell date --utc --rfc-3339=seconds)
docker-build:
cd ../../ && \
$(SUDO) docker build --pull --label org.opencontainers.image.created="$(BUILD_DATE)" \
-f services/ticker/docker/Dockerfile -t $(TAG) .
docker-push:
cd ../../ && \
$(SUDO) docker push $(TAG)
docker-build-dev:
$(SUDO) docker build --pull --label org.opencontainers.image.created="$(BUILD_DATE)" \
-f docker/Dockerfile-dev -t $(TAG) .