-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (54 loc) · 1.65 KB
/
Dockerfile
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM archlinux:latest
RUN pacman-key --init && \
pacman-key --populate archlinux && \
pacman -Sy archlinux-keyring --noconfirm && \
pacman -Syu --noconfirm
# Install necessary packages
RUN pacman -S --noconfirm \
base-devel \
curl \
wget \
git \
rsync
RUN pacman -S --noconfirm \
fish \
qmk \
yazi \
fzf \
ca-certificates \
neovim
RUN rm -rf /root/.config/nvim && \
git clone https://github.com/LazyVim/starter /root/.config/nvim
RUN rm -rf ~/.config/nvim/.git
# Neovim init: not do well so far
RUN nvim --headless +"TSUpdateSync" +"sleep 10" +"qa!"
COPY ocs52_setting.lua /root/.config/nvim/lua/config/options.lua
# Set nvim as default editor so that yazi can open files in nvim
RUN fish -c 'set -Ux EDITOR nvim'
RUN pacman -S --noconfirm \
python \
python-pip \
arm-none-eabi-gcc \
dfu-util \
avr-gcc \
avr-libc \
avrdude \
usbutils
# Refer to keyball guide
# https://github.com/Yowkees/keyball/blob/main/qmk_firmware/keyboards/keyball/readme.md
# clone if keyball directory does not exist
WORKDIR /root
RUN [ -d ".keyball" ] || git clone https://github.com/Yowkees/keyball.git .keyball
# clone if qmk directory does not exist
RUN [ -d "qmk" ] || git clone https://github.com/qmk/qmk_firmware.git --depth 1 --recurse-submodules --shallow-submodules -b 0.22.14 qmk
WORKDIR /root/qmk
RUN qmk setup --yes
# Setting for udev
RUN cp /root/qmk/util/udev/50-qmk.rules /etc/udev/rules.d/
COPY . /root/opt
RUN chmod +x /root/opt/sync-to-host.fish
RUN cp -r /root/opt/Makefile /root/qmk/
# Clear cache
RUN pacman -Scc --noconfirm
RUN chsh -s /usr/bin/fish
ENTRYPOINT ["fish", "-c", "fish /root/opt/sync-to-host.fish; tail -f /dev/null"]