You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docker-browser-box/Makefile

47 lines
1.1 KiB
Makefile

all: build
10 years ago
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
CAPABILITIES = \
--cap-add=SYS_ADMIN
ENV_VARS= \
--env="USER_UID=$(shell id -u)" \
--env="USER_GID=$(shell id -g)" \
--env="DISPLAY" \
--env="XAUTHORITY=${XAUTH}"
VOLUMES = \
--volume=${XSOCK}:${XSOCK} \
--volume=${XAUTH}:${XAUTH} \
--volume=/run/user/$(shell id -u)/pulse:/run/pulse
10 years ago
help:
@echo ""
@echo "-- Help Menu"
@echo ""
@echo " 1. make build - build the browser-box image"
10 years ago
@echo " 1. make install - install launch wrappers"
@echo " 2. make google-chrome - launch google-chrome"
@echo " 2. make tor-browser - launch tor-browser"
@echo " 2. make bash - bash login"
@echo ""
build:
@docker build --tag=${USER}/browser-box .
10 years ago
install uninstall: build
10 years ago
@docker run -it --rm \
--volume=/usr/local/bin:/target \
${USER}/browser-box:latest $@
10 years ago
google-chrome tor-browser chromium-browser firefox bash:
@touch ${XAUTH}
@xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f ${XAUTH} nmerge -
docker run -it --rm \
${CAPABILITIES} \
${ENV_VARS} \
${VOLUMES} \
${USER}/browser-box:latest $@