Refactor Dockerfile and add linguist module

This commit refactors the Dockerfile to:
- Reintroduce the programmer user creation with sudo privileges
- Add necessary system dependencies for development tools
- Update Go installation to include PATH in root's bashrc
- Install github-linguist gem

It also includes the addition of a new linguist command module with functions to interact with GitHub Linguist for language statistics and file information retrieval.
This commit is contained in:
2026-02-21 11:41:21 +01:00
parent 4d81dba1e5
commit 65fc32459a
22 changed files with 265 additions and 5 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/bash
URL="https://go.dev/dl/"
OS=$(uname -a | awk '{print $1}')
ARCH=$(uname -m)
if [[ "$ARCH" == "x86_64" ]] ; then
ARCH="amd64"
fi
if [[ "$ARCH" == "aarch64" ]] ; then
ARCH="arm64"
fi
GOFILE=$(curl "$URL" \
| grep 'class="download"' \
| grep "\.tar\.gz" \
| sed -E 's@^.*/dl/(go[1-9].+\.tar\.gz)".*$@\1@' \
| grep -i "$OS" \
| grep -i "$ARCH" \
| head -1)
GOURL=$(curl "${URL}${GOFILE}" \
| sed -E 's@^.*href="(.*\.tar\.gz)".*$@\1@')
echo "Install GO from : $GOURL" 1>&2
mkdir -p /usr/local
cd /usr/local
curl "$GOURL" \
| tar zxf -