Strip down image

by removing non-required tech from base image

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-08-04 15:29:13 +02:00
parent 01c61e7a62
commit bc61b8a340
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -1,25 +1,20 @@
#!/bin/bash #!/bin/bash
set -euxo pipefail set -euxo pipefail
build_packages=() build_packages=(
tar
)
install_packages=( install_packages=(
curl curl
git git
go sudo
just
make
openssh
nodejs
npm
sudo
tar
) )
pacman -Sy --noconfirm "${build_packages[@]}" "${install_packages[@]}" pacman -Sy --noconfirm "${build_packages[@]}" "${install_packages[@]}"
# Install code-server release # Install code-server release
curl -sSfL "https://github.com/cdr/code-server/releases/download/v${CODE_SERVER_VERSION}/code-server-${CODE_SERVER_VERSION}-linux-amd64.tar.gz" | curl -sSfL "https://github.com/cdr/code-server/releases/download/v${CODE_SERVER_VERSION}/code-server-${CODE_SERVER_VERSION}-linux-amd64.tar.gz" |
tar -xz -C /opt tar -xz -C /opt
mv /opt/code-server-${CODE_SERVER_VERSION}-linux-amd64 /opt/code-server mv /opt/code-server-${CODE_SERVER_VERSION}-linux-amd64 /opt/code-server
# Install dumb-init # Install dumb-init
@ -28,7 +23,7 @@ chmod 0755 /usr/bin/dumb-init
# Install and configure fixuid # Install and configure fixuid
curl -sSfL "https://github.com/boxboat/fixuid/releases/download/v${FIXUID_VERSION}/fixuid-${FIXUID_VERSION}-linux-amd64.tar.gz" | curl -sSfL "https://github.com/boxboat/fixuid/releases/download/v${FIXUID_VERSION}/fixuid-${FIXUID_VERSION}-linux-amd64.tar.gz" |
tar -xz -C /usr/local/bin tar -xz -C /usr/local/bin
chown root:root /usr/local/bin/fixuid chown root:root /usr/local/bin/fixuid
chmod 4755 /usr/local/bin/fixuid chmod 4755 /usr/local/bin/fixuid