-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
Makefile
37 lines (29 loc) · 1.08 KB
/
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
33
34
35
36
37
export DOCKER_IMAGE ?= cloudposse/$(APP)
export DOCKER_TAG ?= dev
export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG)
export DOCKER_BUILD_FLAGS =
COPYRIGHT_SOFTWARE_DESCRIPTION := A secure Bastion host implemented as Docker Container running Alpine Linux with Google Authenticator & DUO MFA support
.PHONY: test buildtest
include $(shell curl --silent -O "https://raw.githubusercontent.com/cloudposse/build-harness/master/templates/Makefile.build-harness"; echo Makefile.build-harness)
reset:
ssh-keygen -R '[localhost]:1234' || true
shell: reset
docker run --name bastion --rm -it -p1234:22 \
-v ~/.ssh/:/root/.ssh/ \
--env-file=../.secrets \
--env-file=../.duo \
-e MFA_PROVIDER=google-authenticator \
-e SLACK_ENABLED=true \
--entrypoint=/bin/bash $(DOCKER_IMAGE_NAME)
run: reset
docker run --name bastion --rm -it -p1234:22 \
-v ~/.ssh/:/root/.ssh/ \
--env-file=../.secrets \
--env-file=../.duo \
-e MFA_PROVIDER=google-authenticator \
-e SLACK_ENABLED=true \
$(DOCKER_IMAGE_NAME)
buildtest:
cd test > /dev/null; ./build.sh
test:
cd test > /dev/null; ./test.sh