-
Notifications
You must be signed in to change notification settings - Fork 1
/
Containerfile.archlinux
69 lines (58 loc) · 3.09 KB
/
Containerfile.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
# Thanks to [GuestSneezeOSDev](https://github.com/GuestSneezeOSDev) for helping create this!
FROM archlinux:latest
# Configure the locale before doing anything.
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen
# The 'archlinux:latest' container usually needs an update first for it to work.
RUN pacman-key --init && pacman -S -y && pacman -S -u --noconfirm
ENV CMD_PACMAN_INSTALL="pacman -S --needed --noconfirm"
# Install useful tools.
RUN ${CMD_PACMAN_INSTALL} base-devel bash clamav cpio git jq man-db nano plocate rsync sudo systemd tmate tmux vim
# Install 'yay' as an AUR package manager.
RUN ${CMD_PACMAN_INSTALL} curl tar
ENV YAY_VER="12.4.2"
RUN curl --location --remote-name https://github.com/Jguer/yay/releases/download/v${YAY_VER}/yay_${YAY_VER}_x86_64.tar.gz --output-dir /tmp/ && tar -x -v -f /tmp/yay_${YAY_VER}_x86_64.tar.gz -C /tmp/ && mv /tmp/yay_${YAY_VER}_x86_64/yay /usr/local/bin/yay && rm -rf /tmp/yay*
RUN groupadd --gid 1001 yay && useradd --uid 1001 --gid 1001 yay
RUN echo "yay ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/yay && chmod 0440 /etc/sudoers.d/yay
ENV CMD_AUR_INSTALL="sudo --user yay yay --noconfirm -S --removemake"
# Install compression tools.
RUN ${CMD_PACMAN_INSTALL} gzip p7zip unrar unzip xz zip zstd
# Install network tools.
RUN ${CMD_PACMAN_INSTALL} curl iproute iputils netcat nmap openssh openssl wget
# Install programming languages and tools.
RUN ${CMD_PACMAN_INSTALL} gcc git github-cli go jdk-openjdk python python-pip python-virtualenv
RUN ${CMD_AUR_INSTALL} git-review
## Install programming language linteres.
RUN ${CMD_PACMAN_INSTALL} python-pylint shellcheck
# Install ZSH.
RUN ${CMD_PACMAN_INSTALL} zsh
# Install container engines.
RUN ${CMD_PACMAN_INSTALL} docker podman
# Sphinx for Root Pages documentation development.
RUN ${CMD_PACMAN_INSTALL} python-sphinx python-sphinx_rtd_theme
# Distrobox support.
## distrobox-init installs these packages. We pre-install them now so the container can start instantly.
## https://github.com/89luca89/distrobox/blob/1.8.0/distrobox-init#L1192
RUN ${CMD_PACMAN_INSTALL} bash bash-completion bc curl diffutils findutils glibc gnupg iputils inetutils keyutils less lsof man-db man-pages mlocate mtr ncurses nss-mdns openssh pigz pinentry procps-ng rsync shadow sudo tcpdump time traceroute tree tzdata unzip util-linux util-linux-libs vte-common wget words xorg-xauth zip mesa vulkan-intel vulkan-radeon
# Install cloud client tools.
RUN ${CMD_PACMAN_INSTALL} azure-cli
# code-server (Microsoft Visual Studio Code web server).
RUN ${CMD_AUR_INSTALL} code-server
# Install Linux distribution agnostic packages.
COPY distro-agnostic-tools.sh /usr/local/bin/
RUN /usr/local/bin/distro-agnostic-tools.sh
# Cleanup.
RUN ${CMD_PACMAN_INSTALL} pacman-contrib
RUN ls /var/cache/pacman/pkg/
RUN pacman -Sc
RUN pacman -Scc
RUN paccache -r
VOLUME ["/home_real"]
# code-server custom port (default is 8080).
EXPOSE 2003
# Toolbox support.
ENV NAME=lukeshortcloud-dev VERSION=rolling
LABEL com.github.containers.toolbox="true" \
name="$NAME" \
version="$VERSION"
RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/toolbox
CMD ["/bin/bash"]