-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
46 lines (36 loc) · 1.52 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
38
39
40
41
42
43
44
45
46
# Make file for the sphinx documentation and docker image
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = docs
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Build the docker image for the base image
docker-build:
docker build -t docker-base -f Dockerfile .
# Run the docker image for the base image as vscode user
docker-run:
docker run -it --rm -v $(PWD):/home/vscode/workspace -u vscode docker-base
# Run as root
docker-run-root:
docker run -d --rm -v $(PWD):/home/vscode/workspace docker-base
docker exec -it $(shell docker ps -q) bash
# Clean up the docker image for the base image
docker-clean:
docker rmi docker-base
# Install Container Structure Testing
cst-install:
curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 && chmod +x container-structure-test-linux-amd64 && sudo mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test
# Run CST Container tests
cst-test:
make docker-build
container-structure-test test --image docker-base --config cst_config.yaml