1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-28 06:01:29 +01:00
dotfiles/Dockerfile

Failed to ignore revisions in .git-blame-ignore-revs.

82 lines
1.9 KiB
Docker
Raw Normal View History

2022-01-30 18:09:35 +01:00
FROM archlinux:latest as base
ENV TERM=xterm-256color
ENV DOTFILES=/root/.dotfiles
RUN pacman --noconfirm -Syu && pacman --noconfirm -Sy \
vim \
tmux \
git \
fzf \
base-devel \
ipython \
python-pip \
htop \
python-pylint \
python-virtualenv \
bash-language-server \
&& rm -rf /var/cache/pacman/pkg/*
2022-02-07 21:10:44 +01:00
# Enable colors in pacman
RUN sed -i 's/^#Color/Color/' /etc/pacman.conf
2022-01-30 18:09:35 +01:00
FROM base as yay_builder
# prepare nobody makepkg user
RUN mkdir /home/build && \
chgrp nobody /home/build && \
chmod g+ws /home/build && \
setfacl -m u::rwx,g::rwx /home/build && \
setfacl -d --set u::rwx,g::rwx,o::- /home/build
RUN sudo pacman -Sy --noconfirm go && rm -rf /var/cache/pacman/pkg/*
# Cannot run makepkg as root
USER nobody
RUN git clone https://aur.archlinux.org/yay.git /home/build/yay
WORKDIR /home/build/yay
RUN env GOCACHE=/home/build makepkg
USER root
RUN pacman --noconfirm -U /home/build/yay/*zst
FROM base as final
WORKDIR /root
RUN pacman -Sy --noconfirm zsh
RUN chsh -s /bin/zsh
COPY --from=yay_builder /home/build/yay/*zst /tmp/
RUN pacman --noconfirm -U /tmp/*zst && rm -rf /tmp/*zst
# bretellofier
RUN pip --no-cache install --upgrade pip git+https://git.decapod.one/brethil/bretellofier
# antibody
RUN curl -sL https://git.io/antibody | sh -s - -b /usr/local/bin
# vim-plug
RUN curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
2022-02-07 21:10:44 +01:00
RUN git clone https://git.decapod.one/brethil/dotfiles ${DOTFILES}
COPY . ${DOTFILES}
2022-01-30 18:09:35 +01:00
WORKDIR /root/
RUN echo "source $DOTFILES/brethil_dotfile.sh" >> .zshrc
RUN ln -s $DOTFILES/vim/vimrc .vimrc
RUN ln -s $DOTFILES/tmux.conf .tmux.conf
RUN echo -e "[include]\npath = $DOTFILES/gitconfig" >> .gitconfig
# Install vim plugins
2022-02-07 21:10:44 +01:00
RUN vim -c 'PlugInstall|qa!'
2022-01-30 18:09:35 +01:00
# Install zsh plugins
2022-02-07 21:10:44 +01:00
RUN zsh -il -c exit
2022-01-30 18:09:35 +01:00
CMD tmux