Monorepo for Aesthetic.Computer aesthetic.computer
at main 155 lines 7.9 kB view raw
1# Aesthetic Computer - Apple Container Runtime Edition 2# Auto-generated from .devcontainer/Dockerfile for native macOS ARM64 virtualization 3# Regenerate with: .devcontainer/generate-apple-container.fish 4# Optimized for Apple Silicon (M1/M2/M3 Pro/Max/Ultra) 5 6FROM fedora:latest 7 8# Preconfigure DNF to minimize footprint 9RUN set -eux; \ 10 echo 'fastestmirror=True' >> /etc/dnf/dnf.conf; \ 11 echo 'max_parallel_downloads=5' >> /etc/dnf/dnf.conf; \ 12 echo 'keepcache=0' >> /etc/dnf/dnf.conf; \ 13 echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf; \ 14 echo 'tsflags=nodocs' >> /etc/dnf/dnf.conf 15 16ENV NODE_OPTIONS=--max_old_space_size=8192 17ENV DENO_DIR=/home/me/.cache/deno 18ENV NETLIFY_DENO_VERSION=2.4.5 19ENV PAGER=cat 20ENV GIT_PAGER=cat 21ENV SYSTEMD_PAGER=cat 22ENV MANPAGER=cat 23 24# --- Base toolchain & deps (ARM64 optimized) --------------------------------- 25RUN dnf update -y && \ 26 dnf install -y \ 27 awk which tree procps-ng coreutils unzip jq bat ripgrep \ 28 git gh gcc gcc-c++ clang make cmake \ 29 python3.11 python3.11-devel python3-pip python3-devel \ 30 emacs-nox fish util-linux-user util-linux-script sshpass \ 31 isync maildir-utils notmuch msmtp \ 32 gnupg2 pinentry \ 33 openssl openssl-devel awscli redis \ 34 dnf-plugins-core iproute nmap-ncat \ 35 inotify-tools wget curl tar gzip bzip2 \ 36 libsodium libsodium-devel libffi libffi-devel \ 37 gmp gmp-devel \ 38 pkg-config autoconf automake libtool \ 39 rsync m4 patch \ 40 sbcl zeromq-devel redhat-rpm-config \ 41 caddy openssh-clients \ 42 && dnf clean all && rm -rf /var/cache/dnf 43 44# --- FFmpeg from RPM Fusion --------------------------------------------------- 45RUN dnf install -y \ 46 https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ 47 https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm \ 48 && dnf install -y --allowerasing --skip-unavailable ffmpeg ffmpeg-devel \ 49 && dnf clean all && rm -rf /var/cache/dnf 50 51# --- Python 3.11 venv as default "python" ------------------------------------- 52RUN /usr/bin/python3.11 -m venv /opt/py311 && \ 53 /opt/py311/bin/pip install -U pip setuptools wheel && \ 54 ln -s /opt/py311/bin/python /usr/local/bin/python && \ 55 ln -s /opt/py311/bin/pip /usr/local/bin/pip 56ENV PATH="/opt/py311/bin:${PATH}" 57 58# --- PyTezos (SmartPy skipped - no ARM64 support) ---------------------------- 59RUN pip install "pytezos>=3.9.0,<4" requests 60 61# --- Stripe CLI (ARM64) ------------------------------------------------------ 62RUN curl -fsSL "https://github.com/stripe/stripe-cli/releases/download/v1.30.0/stripe_1.30.0_linux_arm64.tar.gz" \ 63 | tar xz -C /usr/local/bin 64 65# --- redli (ARM64) ----------------------------------------------------------- 66RUN curl -fsSL "https://github.com/IBM-Cloud/redli/releases/download/v0.15.0/redli_0.15.0_linux_arm64.tar.gz" \ 67 | tar xz -C /usr/local/bin && mv /usr/local/bin/redli_linux_arm64 /usr/local/bin/redli 68 69# --- mkcert (ARM64) ---------------------------------------------------------- 70RUN curl -fsSL "https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-arm64" -o /usr/local/bin/mkcert && \ 71 chmod +x /usr/local/bin/mkcert 72 73# --- ngrok (ARM64) ----------------------------------------------------------- 74RUN curl -fsSL "https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.tgz" -o /tmp/ngrok.tgz && \ 75 tar -xzf /tmp/ngrok.tgz -C /usr/local/bin && rm /tmp/ngrok.tgz 76 77# --- doctl (DigitalOcean CLI, ARM64) ----------------------------------------- 78RUN DOCTL_VERSION=1.109.0 && \ 79 curl -fsSL "https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-arm64.tar.gz" -o /tmp/doctl.tar.gz && \ 80 tar -xzf /tmp/doctl.tar.gz -C /usr/local/bin && rm /tmp/doctl.tar.gz 81 82# --- PowerShell (ARM64) ------------------------------------------------------ 83RUN PS_VERSION=$(curl -s https://api.github.com/repos/PowerShell/PowerShell/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') && \ 84 curl -sSL -o /tmp/powershell.tar.gz "https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/powershell-${PS_VERSION}-linux-arm64.tar.gz" && \ 85 mkdir -p /opt/microsoft/powershell/7 && \ 86 tar -xzf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 && \ 87 chmod +x /opt/microsoft/powershell/7/pwsh && \ 88 ln -s /opt/microsoft/powershell/7/pwsh /usr/local/bin/pwsh && \ 89 rm /tmp/powershell.tar.gz 90 91# --- s3cmd ------------------------------------------------------------------- 92RUN dnf install -y s3cmd && dnf clean all 93 94# --- Jupyter bits ------------------------------------------------------------ 95RUN dnf install -y python3-notebook python3-nbconvert && dnf clean all 96 97# --- gcloud SDK -------------------------------------------------------------- 98RUN curl -sSL https://sdk.cloud.google.com > /tmp/install_gcloud.sh && \ 99 bash /tmp/install_gcloud.sh --disable-prompts --install-dir=/opt && \ 100 ln -s /opt/google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud && \ 101 ln -s /opt/google-cloud-sdk/bin/gsutil /usr/local/bin/gsutil && \ 102 rm /tmp/install_gcloud.sh 103 104# --- User -------------------------------------------------------------------- 105RUN useradd -m me && echo "me ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && chsh -s /usr/bin/fish me 106RUN if test ! -f /usr/bin/fish && test -f /usr/sbin/fish; then ln -s /usr/sbin/fish /usr/bin/fish; fi 107 108USER me 109WORKDIR /home/me 110 111# --- Rust + websocat --------------------------------------------------------- 112RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ 113 . "$HOME/.cargo/env" && \ 114 git clone https://github.com/vi/websocat.git && \ 115 cd websocat && cargo build --release && sudo cp target/release/websocat /usr/local/bin/ && \ 116 cd .. && rm -rf websocat 117 118# --- fnm / Node toolchain ---------------------------------------------------- 119RUN mkdir -p /home/me/.config/fish/conf.d /home/me/.config/fish/functions /home/me/.local/share/fish 120RUN curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "$HOME/.fnm" --skip-shell 121ENV PATH="/home/me/.fnm:${PATH}" 122RUN echo 'fnm env --use-on-cd --shell fish | source' > /home/me/.config/fish/conf.d/fnm.fish && \ 123 export PATH="/home/me/.fnm:${PATH}" && \ 124 eval "$(/home/me/.fnm/fnm env --use-on-cd)" && \ 125 /home/me/.fnm/fnm install lts-jod && \ 126 /home/me/.fnm/fnm default lts-jod && \ 127 npm i -g prettier typescript typescript-language-server npm-check-updates @anthropic-ai/claude-code netlify-cli wrangler 128 129# --- SBCL / Quicklisp -------------------------------------------------------- 130RUN curl -fsSLO https://beta.quicklisp.org/quicklisp.lisp && \ 131 sbcl --non-interactive \ 132 --load quicklisp.lisp \ 133 --eval '(quicklisp-quickstart:install)' \ 134 --eval '(ql-util:without-prompting (ql:add-to-init-file))' \ 135 --eval '(quit)' && \ 136 rm quicklisp.lisp 137 138# --- uv (fast Python package manager) ---------------------------------------- 139RUN curl -LsSf https://astral.sh/uv/install.sh | sh 140ENV PATH="/home/me/.local/bin:${PATH}" 141 142# --- Deno -------------------------------------------------------------------- 143RUN curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/home/me/.deno sh -s v2.4.5 144ENV PATH="/home/me/.deno/bin:${PATH}" 145 146# --- Fish config ------------------------------------------------------------- 147RUN echo 'set -gx PATH /home/me/.fnm /home/me/.deno/bin /home/me/.local/bin /home/me/.cargo/bin $PATH' >> /home/me/.config/fish/config.fish && \ 148 echo 'fnm env --use-on-cd --shell fish | source' >> /home/me/.config/fish/config.fish && \ 149 echo 'fnm use lts-jod --silent-if-unchanged 2>/dev/null' >> /home/me/.config/fish/config.fish && \ 150 echo 'set -U fish_greeting ""' >> /home/me/.config/fish/config.fish 151 152# Default working directory for aesthetic-computer 153WORKDIR /workspaces/aesthetic-computer 154 155CMD ["/usr/bin/fish"]