2015-06-23 17:27:41 +00:00
|
|
|
all: build
|
2014-09-22 20:02:55 +00:00
|
|
|
|
2015-07-12 03:49:34 +00:00
|
|
|
XSOCK=/tmp/.X11-unix
|
|
|
|
XAUTH=/tmp/.docker.xauth
|
|
|
|
|
2014-09-22 20:02:55 +00:00
|
|
|
help:
|
|
|
|
@echo ""
|
|
|
|
@echo "-- Help Menu"
|
|
|
|
@echo ""
|
2014-11-24 07:37:36 +00:00
|
|
|
@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:
|
2014-11-24 07:37:36 +00:00
|
|
|
@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 \
|
2014-11-24 07:37:36 +00:00
|
|
|
${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:
|
2015-07-12 03:49:34 +00:00
|
|
|
@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)" \
|
2015-07-12 03:38:31 +00:00
|
|
|
--env="DISPLAY" \
|
2015-07-12 03:49:34 +00:00
|
|
|
--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 \
|
2014-11-24 07:37:36 +00:00
|
|
|
${USER}/browser-box:latest $@
|