commit a2ad652079e695738b48c39e48bb8643d9c2e8a6 Author: Git Commiter for 96-fromsofia.net <2a9-7cc@96-fromsofia.net> Date: Mon Feb 27 01:44:27 2023 +0000 First commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2c975c5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +#Get the latest archlinux build +FROM archlinux:latest + +# Copy your xcookie to use your X in the container +COPY xcookie /tmp/ + +# Install the necessary packages (I also like to add hunspell but you can amend this) +RUN echo -e "1\nyes" | pacman -Sy xorg-xauth thunderbird hunspell + +# Add your user to run the app +RUN useradd -m thunderbird + +# Add the xcookie to your user we just created +RUN su -c "xauth add $(cat /tmp/xcookie)" thunderbird + +# Select the user we just configured +USER thunderbird + +# Start it all +CMD thunderbird diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..0665e11 --- /dev/null +++ b/README.txt @@ -0,0 +1,28 @@ +# 0) This setup is intended for Desktop use by your local user and not root. +# It will spawn a docker container that will use your Xsession to run the thunderbird email client +# Your user is assumed to have permission to run and build containers + +# 1) Go into the source directory of this app 'thunderbird' and copy it into your docker environment: +# You can use your own path but will need to adjust the below lines and any affected dependant files accordingly +$ cp . /var/lib/docker/configs/thunderbird +$ cd /var/lib/docker/configs/thunderbird + +# 2) Configure the host environment for the container before starting it +# Run 'xauth list' on the Docker host as the user that will run the container (not root, unless root runs X on your system) +# Copy the whole line that was produced by the above command and save it into the xcookie in the source directory of this app + +# 3) Build your container +$ docker build -t . thunderbird + +# 4) Create the below directories within /var/lib/docker/configs/pass/data +# If using a different path to store your containers configurations and data files you will need to modify the paths in the 'firefox-container' script too +$ mkdir -p /var/lib/docker/configs/pass/data/{cache,config,mozilla,thunderbird} +# Create a directory to keep the downloads of your container locally: +$ mkdir -p /home/$USER/Downloads/thunderbird-container + +# 5) Start your container with: +$ thunderbird-container + +# 6) Optionally you can move the start-pass script somewhere inside of your path +$ sudo cp thunderbird-container /usr/loca/bin +$ sudo chmod -v 0755 /usr/loca/bin/thunderbird-container diff --git a/thunderbird-container b/thunderbird-container new file mode 100755 index 0000000..e7ac1bb --- /dev/null +++ b/thunderbird-container @@ -0,0 +1,12 @@ +docker run --rm -it \ + --memory "2048m" \ + --cpus "1" \ + --net=host \ + -v /tmp/.X11-unix \ + -v /home/$USER/Downloads/thunderbird-container:/home/thunderbird/Downloads \ + -v /var/lib/docker/configs/thunderbird/data/cache:/home/thunderbird/.cache \ + -v /var/lib/docker/configs/thunderbird/data/config:/home/thunderbird/.config \ + -v /var/lib/docker/configs/thunderbird/data/mozilla:/home/thunderbird\.mozilla \ + -v /var/lib/docker/configs/thunderbird/data/thunderbird:/home/thunderbird/.thunderbird \ + -e DISPLAY=$DISPLAY \ + thunderbird diff --git a/xcookie b/xcookie new file mode 100644 index 0000000..139597f --- /dev/null +++ b/xcookie @@ -0,0 +1,2 @@ + +