-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-experimental.template
39 lines (32 loc) · 1.37 KB
/
Dockerfile-experimental.template
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
# syntax = docker/dockerfile:experimental
FROM archlinux/base
# Configure pacman
RUN sed '1i\Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch' -i /etc/pacman.d/mirrorlist
RUN sed -e 's/#Color/Color/' -e 's/CheckSpace/#CheckSpace/' -i /etc/pacman.conf
RUN pacman-key --init
COPY arch4edu-keyring/* /usr/share/pacman/keyrings/
RUN pacman-key --populate arch4edu
COPY pacman.conf /tmp
RUN cat /tmp/pacman.conf >> /etc/pacman.conf
RUN rm /tmp/pacman.conf
RUN mv /usr/share/libalpm/hooks/package-cleanup.hook /usr/share/libalpm/hooks/package-cleanup.hook.bak
# System upgrate
RUN --mount=type=cache,target=/var/cache/pacman/pkg \
pacman -Syu --noconfirm
# Install basic packages
RUN --mount=type=cache,target=/var/cache/pacman/pkg \
pacman -S --needed --noconfirm base-devel pkgstats
# Use zsh like archiso
RUN --mount=type=cache,target=/var/cache/pacman/pkg \
pacman -S --needed --noconfirm zsh zsh-completions grml-zsh-config
RUN chsh -s /usr/bin/zsh
# Install packages from packages.txt
RUN --mount=type=cache,target=/var/cache/pacman/pkg \
pacman -S --needed --noconfirm PACKAGES
# Postprocess
RUN --mount=type=cache,target=/var/cache/pacman/pkg \
pacman -Sc --noconfirm
RUN sed 's/#CheckSpace/CheckSpace/' -i /etc/pacman.conf
RUN mv /usr/share/libalpm/hooks/package-cleanup.hook.bak /usr/share/libalpm/hooks/package-cleanup.hook
# Copy README
COPY README.md /root/README.md