forked from marccarre/rust-docker-dev-env
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (25 loc) · 709 Bytes
/
Makefile
File metadata and controls
30 lines (25 loc) · 709 Bytes
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
.PHONY: default build release clean
default: build ;
RUST_VERSION := 1.16.0
IMAGE_USER := marccarre
IMAGE_NAME := rust-dev-env
IMAGE := $(IMAGE_USER)/$(IMAGE_NAME)
build:
docker build \
-t $(IMAGE):latest \
-t $(IMAGE):$(RUST_VERSION) \
-t quay.io/$(IMAGE):latest \
-t quay.io/$(IMAGE):$(RUST_VERSION) \
--build-arg=rust_version=$(RUST_VERSION) \
$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
release:
docker push $(IMAGE):latest
docker push $(IMAGE):$(RUST_VERSION)
docker push quay.io/$(IMAGE):latest
docker push quay.io/$(IMAGE):$(RUST_VERSION)
clean:
docker rmi -f \
$(IMAGE):latest \
$(IMAGE):$(RUST_VERSION) \
quay.io/$(IMAGE):latest \
quay.io/$(IMAGE):$(RUST_VERSION)