docker-browser-box/Makefile

38 lines
1.0 KiB
Makefile
Raw Normal View History

2015-06-23 17:27:41 +00:00
all: build
2014-09-22 20:02:55 +00:00
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
2014-09-22 20:02:55 +00:00
help:
@echo ""
@echo "-- Help Menu"
@echo ""
@echo " 1. make build - build the browser-box image"
2014-09-22 20:02:55 +00:00
@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 .
2014-09-22 20:02:55 +00:00
2014-10-26 14:05:54 +00:00
install uninstall: build
2014-09-22 20:02:55 +00:00
@docker run -it --rm \
--volume=/usr/local/bin:/target \
${USER}/browser-box:latest $@
2014-09-22 20:02:55 +00:00
2015-03-25 13:54:26 +00:00
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 \
--cap-add=SYS_ADMIN \
2014-09-22 20:02:55 +00:00
--env="USER_UID=$(shell id -u)" \
--env="USER_GID=$(shell id -g)" \
--env="DISPLAY" \
--env="XAUTHORITY=${XAUTH}" \
--volume=${XSOCK}:${XSOCK} \
--volume=${XAUTH}:${XAUTH} \
2014-09-22 20:02:55 +00:00
--volume=/run/user/$(shell id -u)/pulse:/run/pulse \
${USER}/browser-box:latest $@