-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
157 lines (148 loc) · 3.96 KB
/
Copy pathContainerfile
File metadata and controls
157 lines (148 loc) · 3.96 KB
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
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 \
# Container tools
buildah \
catatonit \
podman \
# Container storage
containers-storage \
fuse-overlayfs \
# Container networking
aardvark-dns \
iptables \
netavark \
nftables \
slirp4netns \
# Monitoring and diagnostics
bat \
btop \
duf \
lsof \
# Productivity and utilities
fontconfig \
graphviz \
less \
postgresql-client \
ripgrep \
tmux \
unzip \
vim \
zip \
zsh \
# Other package managers
snapd \
; \
# Install universal binary installer (ubi)
curl --silent --location \
https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.sh | \
TAG=v0.8.4 sh; \
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/ \
/tmp/
RUN --mount=type=secret,id=github_token \
set -xe; \
GITHUB_TOKEN=$(cat /run/secrets/github_token); \
UBI_OPTS="--in /usr/local/bin --verbose"; \
pipx install pre-commit; \
pipx install tldr; \
pipx install uv; \
pipx install tmuxp; \
bash /tmp/scripts/install-fonts.sh; \
bash /tmp/scripts/install-plantuml.sh; \
bash /tmp/scripts/install-structurizr.sh; \
bash /tmp/scripts/install-d2.sh; \
ubi --project rui314/mold $UBI_OPTS; \
ubi --project boyter/scc $UBI_OPTS; \
ubi --project mikefarah/yq $UBI_OPTS; \
ubi --project wagoodman/dive $UBI_OPTS; \
ubi --project bootandy/dust $UBI_OPTS; \
ubi --project errata-ai/vale $UBI_OPTS; \
ubi --project tilt-dev/tilt $UBI_OPTS; \
ubi --project tilt-dev/ctlptl $UBI_OPTS; \
ubi --project go-task/task $UBI_OPTS; \
ubi --project twpayne/chezmoi $UBI_OPTS; \
bash /tmp/scripts/install-kubectl.sh v1.33.3; \
ubi --project kubernetes-sigs/cluster-api --exe clusterctl $UBI_OPTS; \
ubi --project cilium/cilium-cli --exe cilium $UBI_OPTS; \
ubi --project bitnami-labs/sealed-secrets --exe kubeseal $UBI_OPTS; \
bash /tmp/scripts/install-helm.sh; \
ubi --project fluxcd/flux2 --exe flux $UBI_OPTS; \
ubi --project siderolabs/talos --exe talosctl $UBI_OPTS; \
ubi --project oven-sh/bun $UBI_OPTS; \
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 \
/opt/pipx/logs/* \
/tmp/* \
$HOME/.cache/* \
$HOME/.local/share/man/* \
;
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/ \
/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; \
sudo bash /tmp/scripts/install-kubectl-plugin-krew.sh; \
kubectl krew install klock; \
bash /tmp/scripts/install-mise.sh; \
.local/bin/mise use -g node@22; \
bash /tmp/scripts/configure-gitk.sh; \
rm -rf /tmp/*;
CMD [ "zsh" ]