adding files

This commit is contained in:
root 2022-03-21 17:01:51 -04:00
commit 76ae019b97
2 changed files with 33 additions and 0 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM ubuntu:latest
#ENV TZ="America/New_York"
RUN mkdir /notes
WORKDIR /notes
RUN apt-get update && apt-get install -y curl vim neovim zsh git \
python3-wheel python3-pip && \
python3 -m pip install -U pip mdv
# Set up zsh
RUN echo "autoload -Uz promptinit" > /root/.zshrc && \
echo "promptinit" >> /root/.zshrc && \
echo "PROMPT=\"[%F{001}%n%F{reset}] %F{069}%1~%F{reset} > \"" >> /root/.zshrc
ENTRYPOINT /bin/zsh

16
run.sh Executable file
View File

@ -0,0 +1,16 @@
rm -rf ./data.link
ln -s "$1/notes" ./data.link
echo "Remade link"
#echo "Start markdown viewer"
#echo "pandoc $1/notes/*.md | lynx -stdin"
echo "Starting container..."
docker run --name privmd --rm -it -v `pwd`/data.link/:/notes `docker build -q .`
echo "Unmounting db..."
luks=`lsblk | grep /media/michael/Return\ to\ mscalz | grep -o -e "luks-[[:alnum:]-]*"`
umount -f "$1"
cryptsetup luksClose /dev/mapper/$luks
echo "Exiting..."