diff --git a/Makefile b/Makefile index 078c5e7..ce0a4df 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,26 @@ .PHONY: build run +# Default values for variables REPO ?= dorowu/ubuntu-desktop-lxde-vnc TAG ?= latest +# you can choose other base image versions IMAGE ?= ubuntu:18.04 +# use tw.archive.ubuntu.com instead of archive.ubuntu.com LOCALBUILD ?= 1 +# choose from supported flavors (see available ones in ./flavors/*.yml) FLAVOR ?= lxde +# armhf or amd64 ARCH ?= amd64 +# These files will be generated from teh Jinja templates (.j2 sources) templates = Dockerfile image/etc/supervisor/conf.d/supervisord.conf +# Rebuild the container image build: $(templates) docker build -t $(REPO):$(TAG) . +# Test run the container +# the local dir will be mounted under /src read-only run: docker run --rm \ -p 6080:80 -p 6081:443 \ @@ -24,9 +33,11 @@ run: --name ubuntu-desktop-lxde-test \ $(REPO):$(TAG) +# Connect inside the running container for debugging shell: docker exec -it ubuntu-desktop-lxde-test bash +# Generate the SSL/TLS config for HTTPS gen-ssl: mkdir -p ssl openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ @@ -35,6 +46,8 @@ gen-ssl: clean: rm -f $(templates) + +# Run jinja2cli to parse Jinja template applying rules defined in the flavors definitions %: %.j2 flavors/$(FLAVOR).yml docker run -v $(shell pwd):/data vikingco/jinja2cli \ -D flavor=$(FLAVOR) \