From 6af516b9ca11352e1e88d7c9c94003c369882fdf Mon Sep 17 00:00:00 2001 From: nnnet Date: Wed, 28 Jan 2026 15:49:42 +0300 Subject: [PATCH] add install brew and go in Dockerfile --- Dockerfile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9c6aa7036..5789c8b78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,31 @@ FROM node:22-bookworm RUN curl -fsSL https://bun.sh/install | bash ENV PATH="/root/.bun/bin:${PATH}" +# Install dependencies Start +RUN apt-get update && apt-get install -y bash build-essential curl file git sudo + +## Create user for brew + +# 1. Create user (via /bin/sh) +RUN /bin/sh -c "useradd -m -s /bin/bash linuxbrew && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers" + +USER linuxbrew + +# 2. Install Homebrew (via /bin/sh, calling bash for the script) +RUN /bin/sh -c "curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash" + +# Setup paths +ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}" + +RUN brew update +# Now you can install go +RUN brew install go + +# Install dependencies End + +# Switch back to superuser for system settings +USER root + RUN corepack enable WORKDIR /app