-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild-image
More file actions
executable file
·39 lines (30 loc) · 803 Bytes
/
build-image
File metadata and controls
executable file
·39 lines (30 loc) · 803 Bytes
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
#!/bin/sh
# exit on failure
set -e
# exit on unassigned variable
set -u
# switch working directory
cd $(dirname $0)
# avoid locale issues
export LC_ALL=C
export LANG=C
# dpkg shouldn't ask questions
export DEBIAN_FRONTEND=noninteractive
# configure apt sources
cat >/etc/apt/sources.list <<EOF
deb http://archive.ubuntu.com/ubuntu/ noble main restricted universe
deb http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe
deb http://archive.ubuntu.com/ubuntu/ noble-security main restricted universe
EOF
# update package list
apt-get update
# install required packages
apt-get install -y --no-install-recommends \
ca-certificates \
python3-minimal \
squid \
wget
# clean cache and temporary files
cd /
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*