More docs

This commit is contained in:
Olivier Berger 2019-04-04 16:42:58 +02:00
parent 034a4876f4
commit 59822970a7

View file

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