Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Update Node.js Dockerfile to install Yarn differently (#1165)

Tomas Srnka1852298a1a1f
diff --git a/templates/base/e2b.Dockerfile b/templates/base/e2b.Dockerfile
index e983b8108..367b156b3 100644
--- a/templates/base/e2b.Dockerfile
+++ b/templates/base/e2b.Dockerfile
@@ -10,7 +10,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
-ENV NODE_VERSION 20.9.0
+ENV NODE_VERSION=20.9.0
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
@@ -55,26 +55,5 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& node --version \
&& npm --version
-ENV YARN_VERSION 1.22.19
-
-RUN set -ex \
- # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
- && export GNUPGHOME="$(mktemp -d)" \
- && for key in \
- 6A010C5166006599AA17F08146C2130DFD2497F5 \
- ; do \
- gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
- gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
- done \
- && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
- && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
- && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
- && gpgconf --kill all \
- && rm -rf "$GNUPGHOME" \
- && mkdir -p /opt \
- && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
- && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
- && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
- && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
- # smoke test
+RUN npm install -g [email protected] \
&& yarn --version