Merge 6af516b9ca into 6af205a13a
This commit is contained in:
commit
917128bd5f
25
Dockerfile
25
Dockerfile
@ -4,6 +4,31 @@ FROM node:22-bookworm
|
|||||||
RUN curl -fsSL https://bun.sh/install | bash
|
RUN curl -fsSL https://bun.sh/install | bash
|
||||||
ENV PATH="/root/.bun/bin:${PATH}"
|
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
|
RUN corepack enable
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user