add install brew and go in Dockerfile

This commit is contained in:
nnnet 2026-01-28 15:49:42 +03:00
parent da421b9ef7
commit 6af516b9ca

View File

@ -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