FROM mcr.microsoft.com/vscode/devcontainers/base:debian-11 ############################################################################ # ARG ############################################################################ ARG USERNAME=vscode ARG TARGETARCH ARG TARGETPLATFORM ############################################################################ # DOCKER BUILDX FLAG ############################################################################ ENV BUILDX_NO_DEFAULT_ATTESTATIONS="1" ENV DOCKER_BUILDKIT=1 ########################################################################## # MISC (MIGHT BE IMPORTANT) ########################################################################### RUN apt-get install xz-utils -y RUN apt-get install libc6-dev -y ########################################################################## # MISC (MIGHT BE IMPORTANT) ########################################################################### RUN apt-get update && apt-get install -y tmux # ############################################################################ # # PERSISTENT CMD HISTORY # ############################################################################ RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.zsh_history" \ && mkdir /commandhistory \ && touch /commandhistory/.zsh_history \ && chown -R $USERNAME /commandhistory \ && echo $SNIPPET >>"/home/$USERNAME/.zshrc" ############################################################################ # INSTALL DENO ############################################################################ USER root ENV DENO_VERSION=v2.4.5 ENV DENO_INSTALL=/deno RUN mkdir -p /deno && curl -fsSL https://deno.land/x/install/install.sh | sh -s ${DENO_VERSION} && chown -R vscode /deno ENV PATH=${DENO_INSTALL}/bin:${PATH} ENV DENO_DIR=${DENO_INSTALL}/.cache/deno ############################################################################ # INSTALL DENO ############################################################################ USER vscode RUN git clone https://github.com/ghostmind-dev/run.git ${HOME}/run RUN deno install --allow-all --force --global --name run ${HOME}/run/run/bin/cmd.ts ENV PATH="/home/vscode/.deno/bin:${PATH}" ############################################################################ # INSTALL NODEJS ############################################################################ USER root # Install curl if not available and add NodeSource repository RUN apt-get update && \ apt-get install -y curl && \ curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \ apt-get install -y nodejs && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* ############################################################################ # INSTALL GCLOUD ############################################################################ USER root ENV GCLOUD_VERSION=529.0.0 RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=x86_64; else ARCHITECTURE=arm; fi \ && cd /tmp \ && curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-${GCLOUD_VERSION}-linux-${ARCHITECTURE}.tar.gz \ && tar -xf google-cloud-cli-${GCLOUD_VERSION}-linux-${ARCHITECTURE}.tar.gz \ && /tmp/google-cloud-sdk/install.sh \ && mv /tmp/google-cloud-sdk/ /usr/local/lib ENV PATH="$PATH:/usr/local/lib/google-cloud-sdk/bin" RUN gcloud components install gke-gcloud-auth-plugin ############################################################################ # HASHICORP VAULT ############################################################################ USER root RUN apt update RUN apt install -y gpg RUN wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg RUN echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list RUN apt update RUN apt install vault -y ############################################################################ # INSTALL GO ############################################################################ USER root ENV GO_VERSION=1.21.2 RUN wget https://golang.org/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz RUN tar -C /usr/local -xzf go${GO_VERSION}.linux-${TARGETARCH}.tar.gz ENV PATH="$PATH:/usr/local/go/bin" # ############################################################################ # # INSTALL ACT # ############################################################################ USER root ENV ACT_VERSION=0.2.61 RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=x86_64; else ARCHITECTURE=arm64; fi \ && cd /tmp \ && wget https://github.com/nektos/act/releases/download/v${ACT_VERSION}/act_Linux_${ARCHITECTURE}.tar.gz \ && tar -xvf act_Linux_${ARCHITECTURE}.tar.gz \ && mv act /usr/local/bin/act ############################################################################ # INSTALL TERRAFORM ############################################################################ USER root ENV TERRAFORM_VERSION=1.6.0 RUN cd /tmp \ && wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip \ && unzip terraform_${TERRAFORM_VERSION}_linux_${TARGETARCH}.zip -d /usr/bin ############################################################################ # INSTALL HASURA ############################################################################ USER root RUN curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash ############################################################################ # CLOUDFLARED ############################################################################ USER root RUN sudo mkdir -p --mode=0755 /usr/share/keyrings RUN curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null RUN echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/cloudflared.list RUN apt-get update && sudo apt-get install cloudflared ############################################################################ # PYTHON CONFIG ############################################################################ USER root RUN sudo apt-get update && sudo apt-get install -y \ make \ build-essential \ libssl-dev \ zlib1g-dev \ libbz2-dev \ libreadline-dev \ libsqlite3-dev \ wget \ curl \ llvm \ libncurses5-dev \ libncursesw5-dev \ xz-utils \ tk-dev \ libffi-dev \ liblzma-dev \ python3-pip \ python3-openssl \ git USER vscode RUN curl https://pyenv.run | bash # Set environment variables for pyenv ENV PATH="/home/vscode/.pyenv/bin:/home/vscode/.pyenv/shims:${PATH}" RUN pyenv install 3.12.7 RUN pyenv install 3.9.7 RUN pyenv global 3.12.7 ############################################################################ # INSTALL CURL ############################################################################ USER root RUN curl -LsSf https://astral.sh/uv/install.sh | sh ENV UV_TOOL_BIN_DIR="/usr/local/bin" ENV UV_TOOL_DIR="/usr/local/share/uv-tools" ENV PATH="/usr/local/bin:$PATH" ############################################################################ # INSTALL POSTGRESQL CLIENT ############################################################################ USER root RUN apt-get install -y postgresql-client ############################################################################ # INSTALL GLOBAL NPM PACKAGES (NO SUDO, PER-USER PREFIX) ############################################################################ USER vscode RUN mkdir -p /home/vscode/.npm-global ENV NPM_CONFIG_PREFIX=/home/vscode/.npm-global ENV PATH="/home/vscode/.npm-global/bin:${PATH}" RUN mkdir -p "$NPM_CONFIG_PREFIX" RUN npm install -g nodemon@3.1.1 RUN npm install -g @devcontainers/cli@0.80.1 RUN npm install -g dotenv-cli@10.0.0 RUN npm install -g firebase-tools ############################################################################ # INSTALL UV ############################################################################ USER vscode RUN curl -LsSf https://astral.sh/uv/install.sh | sh # Add UV to PATH so it can be found (for vscode user) ENV PATH="/home/vscode/.local/bin:$PATH" # Make sure uv is executable and test it's working RUN chmod +x /home/vscode/.local/bin/uv && /home/vscode/.local/bin/uv --version ############################################################################ # SET USER ############################################################################ USER vscode RUN mkdir -p /home/vscode/.claude ############################################################################ # SET USER ############################################################################ USER vscode # ############################################################################ # # THE END # ############################################################################