From 67ec6b7dd1303d8a3633c23a38789ca10b764fd0 Mon Sep 17 00:00:00 2001 From: edraft Date: Sat, 4 Jan 2025 14:15:47 +0100 Subject: [PATCH] Build more stuff like py3.12, node & docker --- dockerfile | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 97fef58..bd38667 100644 --- a/dockerfile +++ b/dockerfile @@ -4,6 +4,15 @@ RUN sudo apt update RUN sudo apt upgrade -y RUN sudo apt install -y nano curl wget zip unzip tree +# install docker +RUN sudo apt update && \ + apt install -y ca-certificates curl gnupg lsb-release && \ + mkdir -m 0755 -p /etc/apt/keyrings && \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -i | awk '{ print tolower($3) }') $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list && \ + apt update && \ + apt install -y docker-ce-cli docker-buildx-plugin docker-compose-plugin + # install python3.10 RUN sudo apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev && \ wget https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tgz && \ @@ -13,4 +22,21 @@ RUN sudo apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev l make -j $(nproc) && \ sudo make altinstall && \ python3.10 -m pip install --user --upgrade pip && \ - cd ../ && sudo rm -rf Python-3.10.*/ \ No newline at end of file + cd ../ && sudo rm -rf Python-3.10.*/ + +# install python3.12 +RUN sudo apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev && \ + wget https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz && \ + tar -xf Python-3.12.*.tgz && \ + cd Python-3.12.*/ && \ + ./configure --prefix=/usr/local --enable-optimizations --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" && \ + make -j 2 && \ + sudo make altinstall && \ + python3.12 -m pip install --user --upgrade pip && \ + cd ../ && sudo rm -rf Python-3.12.*/ + +# install nodejs +RUN sudo apt install -y curl && \ + curl -sL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh && \ + sudo apt install -y nodejs && \ + sudo apt install -y npm \ No newline at end of file