diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 2522c917..b6f5b7b7 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -16,7 +16,13 @@ git \ sudo \ curl \ cmake \ +libwrap0 \ +apt-utils \ build-essential \ +apt-transport-https \ +#moby-compose \ +#moby-buildx \ +#moby-cli \ " RUN set ${BASH_FLAGS} \ && apt-get update \ @@ -41,31 +47,31 @@ RUN set ${BASH_FLAGS} \ ${USERNAME} \ && echo -# Install GitHub `gh` cli from github.com/cli/cli -RUN set ${BASH_FLAGS} \ - && export NAME=gh \ - && export TEST="${NAME} version" \ - && export REPOSITORY="cli/cli" \ - && export VERSION_TAG="$(curl -Lks https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ - && export VERSION="${VERSION_TAG#v}" \ - && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ - && export PKG="${NAME}_${VERSION}_linux_${ARCH}.tar.gz" \ - && export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION_TAG}/${PKG}" \ - && echo "---------------------------------------------------------"\ - && echo "INFO[${NAME}] Installed:" \ - && echo "INFO[${NAME}] Command: ${NAME}" \ - && echo "INFO[${NAME}] Package: ${PKG}" \ - && echo "INFO[${NAME}] Latest Release: ${VERSION_TAG}" \ - && echo "INFO[${NAME}] Architecture: ${ARCH}" \ - && echo "INFO[${NAME}] Source: ${URL}" \ - && echo "---------------------------------------------------------"\ - && curl -Lks ${URL} | tar xzvf - --directory /tmp \ - && sudo install -m 755 /tmp/${NAME}_${VERSION}_linux_${ARCH}/bin/${NAME} ${BIN}/${NAME} \ - && rm -rf /tmp/${NAME}_${VERSION}_linux_${ARCH} \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get clean \ - && ${TEST} \ - && echo +## Install GitHub `gh` cli from github.com/cli/cli +#RUN set ${BASH_FLAGS} \ +# && export NAME=gh \ +# && export TEST="${NAME} version" \ +# && export REPOSITORY="cli/cli" \ +# && export VERSION_TAG="$(curl -Lks https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ +# && export VERSION="${VERSION_TAG#v}" \ +# && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ +# && export PKG="${NAME}_${VERSION}_linux_${ARCH}.tar.gz" \ +# && export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION_TAG}/${PKG}" \ +# && echo "---------------------------------------------------------"\ +# && echo "INFO[${NAME}] Installed:" \ +# && echo "INFO[${NAME}] Command: ${NAME}" \ +# && echo "INFO[${NAME}] Package: ${PKG}" \ +# && echo "INFO[${NAME}] Latest Release: ${VERSION_TAG}" \ +# && echo "INFO[${NAME}] Architecture: ${ARCH}" \ +# && echo "INFO[${NAME}] Source: ${URL}" \ +# && echo "---------------------------------------------------------"\ +# && curl -Lks ${URL} | tar xzvf - --directory /tmp \ +# && sudo install -m 755 /tmp/${NAME}_${VERSION}_linux_${ARCH}/bin/${NAME} ${BIN}/${NAME} \ +# && rm -rf /tmp/${NAME}_${VERSION}_linux_${ARCH} \ +# && rm -rf /var/lib/apt/lists/* \ +# && apt-get clean \ +# && ${TEST} \ +# && echo # Install Gitpod CLI from gitpod.io RUN set ${BASH_FLAGS} \ @@ -111,12 +117,42 @@ RUN set ${BASH_FLAGS} \ && ${TEST} \ && echo -# Set working directory -WORKDIR /workspaces/veilid +################################################################################## +# Install nodejs npm yarn +RUN set ${BASH_FLAGS} \ + && export NODE_MAJOR=23 \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && chmod 644 /etc/apt/keyrings/nodesource.gpg \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ + && apt-get update \ + && apt-get install -y nodejs \ + && apt-get clean \ + && apt-get autoremove -y \ + && apt-get purge -y --auto-remove \ + && rm -rf /var/lib/apt/lists/* \ + && node --version \ + && npm --version \ + && npm install --global yarn \ + && yarn --version # Set the default user USER $USERNAME +# Install claude-code +# Configure npm global packages to install in user home +RUN echo \ + && mkdir -p ~/.npm-global \ + && npm config set prefix ~/.npm-global \ + && echo 'export PATH=~/.npm-global/bin:$PATH' >> /home/${USERNAME}/.bashrc \ + && export PATH=~/.npm-global/bin:$PATH \ + && npm install -g @anthropic-ai/claude-code \ + && echo "Claude Code installed at: $(which claude-code)" \ + && true + +# Set working directory +WORKDIR /workspaces/veilid + # Expose port EXPOSE 5150