-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile
136 lines (127 loc) · 3.26 KB
/
Containerfile
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
FROM ubuntu:24.04
# Replace dash with bash
RUN ln -sf /usr/bin/bash /usr/bin/sh
RUN \
# Cache dependencies outside of the container, e.g., in
# /var/tmp/buildah-cache-$(id -u)
--mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
set -xe; \
rm -f /etc/apt/apt.conf.d/docker-clean; \
apt-get update; \
apt-get upgrade --yes; \
apt-get install --yes --no-install-recommends \
# Core system utilities
ca-certificates \
locales \
lsb-release \
systemd \
sudo \
uidmap \
# Development tools
build-essential \
clang \
make \
git \
git-lfs \
gitk \
jq \
openjdk-21-jdk \
python3 \
python3-pip \
pipx \
# Networking and connectivity
dnsutils \
inetutils-ping \
iproute2 \
ssh \
curl \
wget \
# Containers and virtualization
containers-storage \
fuse-overlayfs \
podman \
slirp4netns \
# Monitoring and diagnostics
bat \
btop \
duf \
lsof \
# Productivity and utilities
less \
fontconfig \
graphviz \
tmux \
unzip \
vim \
zip \
zsh \
postgresql-client \
# Other package managers
snapd \
; \
locale-gen en_US.UTF-8; \
ln -sf /usr/bin/batcat /usr/bin/bat; \
ln -sf /usr/bin/python3 /usr/bin/python;
ENV LANG=en_US.UTF-8
ENV PIPX_HOME=/opt/pipx
ENV PIPX_BIN_DIR=/usr/local/bin
COPY \
common/resources/tmp/ \
images/dev/resources/tmp/ \
/tmp/
RUN set -xe; \
pipx install pre-commit; \
pipx install tldr; \
pipx install poetry; \
pipx install uv; \
pipx install tmuxp; \
bash /tmp/scripts/install-mold.sh; \
bash /tmp/scripts/install-scc.sh; \
bash /tmp/scripts/install-yq.sh; \
bash /tmp/scripts/install-tilt.sh; \
bash /tmp/scripts/install-dive.sh; \
bash /tmp/scripts/install-dust.sh; \
bash /tmp/scripts/install-vale.sh; \
bash /tmp/scripts/install-fonts.sh; \
bash /tmp/scripts/install-plantuml.sh; \
bash /tmp/scripts/install-structurizr.sh; \
bash /tmp/scripts/install-d2.sh; \
bash /tmp/scripts/install-task.sh; \
bash /tmp/scripts/install-chezmoi.sh; \
bash /tmp/scripts/install-kubectl.sh v1.32.2; \
bash /tmp/scripts/install-clusterctl.sh 1.9.5; \
bash /tmp/scripts/install-cilium.sh; \
bash /tmp/scripts/install-kubeseal.sh; \
bash /tmp/scripts/install-helm.sh; \
bash /tmp/scripts/install-flux.sh; \
bash /tmp/scripts/install-talos.sh; \
bash /tmp/scripts/install-bun.sh; \
bash /tmp/scripts/install-zoxide.sh; \
userdel --remove ubuntu; \
bash /tmp/scripts/setup-user.sh dev; \
bash /tmp/scripts/configure-podman.sh dev; \
rm -rf /tmp/*;
COPY \
common/resources/etc/ \
images/dev/resources/etc/ \
/etc/
RUN set -xe; \
sed -i 's/{{ USER }}/dev/' /etc/wsl.conf;
USER dev
WORKDIR /home/dev
COPY --chown=dev:dev \
common/resources/tmp/ \
images/dev/resources/tmp/ /tmp/
RUN set -xe; \
bash /tmp/scripts/install-rust.sh; \
# Install dotfiles
chezmoi init --apply MLNW; \
# Remove any sockets, e.g., created by tmux during plugin installation
find /tmp -type s -delete; \
bash /tmp/scripts/install-bun.sh; \
bash /tmp/scripts/install-mise.sh; \
.local/bin/mise use -g node@22; \
bash /tmp/scripts/configure-gitk.sh; \
rm -rf /tmp/*;
CMD [ "zsh" ]