forked from cloudposse-archives/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (25 loc) · 859 Bytes
/
Makefile
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
SHELL := /bin/bash
export DOCKER_ORG ?= cloudposse
export DOCKER_IMAGE ?= $(DOCKER_ORG)/tutorials
export DOCKER_TAG ?= latest
export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG)
export CONTAINER_NAME ?= tuts
# List of targets the `readme` target should call before generating the readme
export README_DEPS ?= docs/targets.md
-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness)
## Initialize build-harness, install deps, build docker container, install wrapper script and run shell
all: init deps build run
@exit 0
## Install dependencies (if any)
deps:
@exit 0
## Build docker image
build:
@make --no-print-directory docker/build
run:
@docker run -it \
--rm \
--volume "$$HOME":/localhost \
--volume "$$PWD":/tutorials \
--name $(CONTAINER_NAME) \
cloudposse/tutorials:latest;