-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.archlinux
181 lines (155 loc) · 3.73 KB
/
Dockerfile.archlinux
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
FROM archlinux:base-devel
ARG USER=shank
ARG PASSWD=pass
ARG UID=1000
ARG GID=1000
ENV USER=${USER}
ENV HOME=/home/${USER}
# better colors
ENV TERM=xterm-256color
# update
RUN pacman -Syu --noconfirm
# init keyring
RUN pacman-key --init
# locale
RUN sed -i -e 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen \
&& sed -i -e 's/LANG=.*/LANG=en_US.UTF-8/' /etc/locale.conf
# add arcolinux repositories and keys
RUN pacman -S --noconfirm wget
RUN wget bit.ly/get-arcolinux-keys && chmod +x ./get-arcolinux-keys && sudo ./get-arcolinux-keys
# update again
RUN pacman -Syu --noconfirm
# arcolinux fixes
RUN pacman -Sy --noconfirm arcolinux-system-config-git
RUN /usr/local/bin/arcolinux-fix-pacman-conf
RUN /usr/local/bin/arcolinux-fix-pacman-databases-and-keys
# fix manpages
# update all packages except: tzdata, filesystem
RUN pacman -Qk 2>&1 \
| grep warning: \
| awk '{print $2}' \
| sort -u \
| sed -e 's/://' \
| grep --invert-match --extended-regexp "tzdata|filesystem" \
| grep --invert-match --extended-regexp "^[0-9]+$" \
| grep --invert-match --extended-regexp "2warning" \
| xargs pacman -Sy --noconfirm
# timezone
ENV TZ="America/Indianapolis"
RUN ln -s /usr/share/zoneinfo/America/Indianapolis /etc/localtime
# remove mlocate -- to be replaced with plocate below
# RUN pacman -R --noconfirm mlocate
# packages
RUN pacman -Sy --noconfirm \
bat \
bc \
bfs \
bpython \
clang \
cmake \
difftastic \
direnv \
docker \
exa \
expac \
fd \
fish \
fzf \
gdb \
gdu \
htop \
jq \
just \
lazygit \
less \
lld \
lldb \
man-db \
man-pages \
neofetch \
neovim \
ninja \
nodejs \
npm \
openssh \
pacman-contrib \
parallel \
paru \
patchelf \
plocate \
poppler \
prettier \
procs \
python \
python-black \
python-neovim \
python-pip \
python-pipx \
remake \
ripgrep \
rsync \
rust-analyzer \
rustup \
sd \
shfmt \
stow \
strace \
stylua \
tealdeer \
tmux \
tokei \
tree \
tree-sitter \
tree-sitter-cli \
unarchiver \
unzip \
xclip \
xsel \
yazi \
zoxide
# fish prompt
RUN sd -s "'>'" "' |'" /usr/share/fish/functions/fish_prompt.fish
RUN sd -s "'#'" "' #'" /usr/share/fish/functions/fish_prompt.fish
# create user
RUN useradd --create-home ${USER} --uid ${UID} --shell /usr/bin/bash && \
echo "${USER}:${PASSWD}" | chpasswd && \
echo "${USER} ALL=(ALL) ALL" >> /etc/sudoers
RUN echo "${USER}:${PASSWD}" | chpasswd
RUN chown -R ${USER} /home/${USER}
# change users default shell
RUN chsh ${USER} --shell /usr/bin/fish
# change to $USER directory
WORKDIR /home/${USER}
USER ${USER}
# dotfiles
RUN git clone https://gitlab.com/shank/dotfiles.git \
&& cd dotfiles \
&& git remote set-url origin [email protected]:shank/dotfiles.git
# install rust (using rustup)
RUN rustup install nightly stable
RUN rustup default nightly
# cargo utils
RUN /usr/bin/bash --login -c 'cargo install cargo-cache'
# stow packages
RUN cd dotfiles \
&& rm --force ${HOME}/.config/fish/functions/fish_user_key_bindings.fish \
&& stow --verbose --no-folding fish neovim tmux bins git gdb yazi neovim
# tmux plugin manager
RUN git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
# nix installation
USER root
RUN mkdir /nix && chown ${USER} /nix
USER ${USER}
RUN curl -L https://nixos.org/nix/install | sh
# change the shell for the rest of the commands commands
SHELL ["/usr/bin/fish", "--login", "-c"]
# my utils (utils-rs)
RUN git clone https://gitlab.com/shank/utils-rs.git \
&& cd utils-rs \
&& just install \
&& cd .. \
&& rm -r utils-rs
# fisher (fish shell)
RUN curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
RUN fisher install patrickf1/fzf.fish vitallium/tokyonight-fish