forked from masasam/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (35 loc) · 1.14 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
FROM archlinux:latest
ARG USERNAME=masa
ARG PASSWORD=hogehoge
ARG REPOSITORY=/home/${USERNAME}/src/github.com/masasam
ENV HOME /home/${USERNAME}
RUN pacman -Syu --noconfirm
RUN pacman -S base base-devel --noconfirm
RUN echo thinkpad > /etc/hostname
RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen
RUN locale-gen
RUN export LANG=C
RUN echo LANG=ja_JP.UTF-8 > /etc/locale.conf
RUN useradd -m -r -G wheel -s /bin/bash ${USERNAME}
RUN echo "root:${PASSWORD}" | chpasswd
RUN echo "${USERNAME}:${PASSWORD}" | chpasswd
RUN echo '%wheel ALL=(ALL) ALL' | EDITOR='tee -a' visudo
RUN pacman -Syy
RUN pacman -S xdg-user-dirs --noconfirm
RUN pacman -S git --noconfirm
RUN pacman -S go --noconfirm
RUN pacman -S wget --noconfirm
ENV HOME /home/${USERNAME}
WORKDIR /home/${USERNAME}
USER ${USERNAME}
RUN LANG=C xdg-user-dirs-update --force &&\
mkdir -p ${REPOSITORY}
USER ${USERNAME}
WORKDIR /tmp
RUN wget https://github.com/Jguer/yay/releases/download/v10.3.1/yay_10.3.1_x86_64.tar.gz &&\
tar xzvf yay_10.3.1_x86_64.tar.gz
USER root
RUN cp /tmp/yay_10.3.1_x86_64/yay /usr/bin/yay
USER ${USERNAME}
WORKDIR ${REPOSITORY}
RUN git clone https://github.com/masasam/dotfiles