-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (40 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
50 lines (40 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM archlinux:latest
# Install base image packages
RUN pacman -Syu --noconfirm \
&& pacman -S --noconfirm base-devel git curl unzip zsh
# Create a fully priviledged user
RUN useradd -ms /bin/zsh dev \
&& passwd -d dev \
&& echo "dev ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/dev
# Switch to the new user
USER dev
WORKDIR /home/dev
# Install AUR helper and flutter (mandatory)
RUN git clone https://aur.archlinux.org/yay-bin.git /tmp/yay-bin \
&& cd /tmp/yay-bin \
&& makepkg -si --noconfirm
RUN yay -S --noconfirm flutter
RUN sudo chown -R dev /opt/flutter
RUN flutter channel stable
# Setup zsh config
RUN git clone https://github.com/chinarjoshi/dotfiles /tmp/dotfiles \
&& mv /tmp/dotfiles/zsh ~/.config/zsh \
&& rm -f ~/.config/zsh/.zshenv \
&& echo 'export ZDOTDIR=~/.config/zsh' > ~/.zshenv
COPY p10k-instant-prompt.zsh /home/dev/.cache/p10k-instant-prompt-c.zsh
COPY gitstatusd /home/dev/.cache/gitstatus/gitstatusd-linux-x86_64
RUN sudo chown dev /home/dev/.cache/*
ENV CHROME_EXECUTABLE=/usr/bin/google-chrome-stable
# Setup neovim config
RUN sudo pacman -S --noconfirm neovim
RUN git clone https://github.com/chinarjoshi/nvdev ~/.config/nvim
RUN nvim -c 'q'
# Install rest of packages
COPY pkgs.txt /tmp/pkgs.txt
RUN cat /tmp/pkgs.txt | xargs yay -Syu --noconfirm
# Add dev to the docker group
RUN sudo usermod -aG docker dev
# Clean up files
RUN sudo rm -rf /tmp/*
# Enter shell
CMD ["zsh"]