mirror of
https://github.com/fcwu/docker-ubuntu-vnc-desktop
synced 2026-08-05 16:12:41 +02:00
Merge branch 'develop' into bionic-lxqt
This commit is contained in:
@@ -1,30 +1,46 @@
|
||||
.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
|
||||
LOCALBUILD ?= tw
|
||||
HTTP_PASSWORD ?= 123456
|
||||
CUSTOM_USER ?= ubuntu
|
||||
PASSWORD ?= ubuntu
|
||||
# choose from supported flavors (see available ones in ./flavors/*.yml)
|
||||
FLAVOR ?= lxqt
|
||||
# armhf or amd64
|
||||
ARCH ?= amd64
|
||||
|
||||
templates = Dockerfile image/etc/supervisor/conf.d/supervisord.conf
|
||||
# These files will be generated from teh Jinja templates (.j2 sources)
|
||||
templates = Dockerfile rootfs/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 \
|
||||
-v ${PWD}:/src:ro \
|
||||
-e USER=doro -e PASSWORD=mypassword \
|
||||
-e ALSADEV=hw:2,0 \
|
||||
-e SSL_PORT=443 \
|
||||
-e RELATIVE_URL_ROOT=approot \
|
||||
-v ${PWD}/ssl:/etc/nginx/ssl \
|
||||
--device /dev/snd \
|
||||
--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 \
|
||||
@@ -32,7 +48,12 @@ gen-ssl:
|
||||
|
||||
clean:
|
||||
rm -f $(templates)
|
||||
|
||||
|
||||
extra-clean:
|
||||
docker rmi $(REPO):$(TAG)
|
||||
docker image prune -f
|
||||
|
||||
# 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) \
|
||||
|
||||
Reference in New Issue
Block a user