Skip to content

Automate browser based workflows with AI

Add Bitwarden to Dockerfile (#1562)

Suchintand4c2075d37f8
diff --git a/Dockerfile b/Dockerfile
index 8572f2cfb..e11e67713 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,7 +13,26 @@ COPY --from=requirements-stage /tmp/requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN playwright install-deps
RUN playwright install
-RUN apt-get install -y xauth x11-apps netpbm && apt-get clean
+RUN apt-get install -y xauth x11-apps netpbm curl && apt-get clean
+
+# nvm env vars
+RUN mkdir -p /usr/local/nvm
+ENV NVM_DIR /usr/local/nvm
+ENV NODE_VERSION v20.12.2
+# install nvm
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
+# install node and npm
+RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use --delete-prefix $NODE_VERSION"
+# add node and npm to the PATH
+ENV NODE_PATH $NVM_DIR/versions/node/$NODE_VERSION/bin
+ENV PATH $NODE_PATH:$PATH
+# confirm installation
+RUN npm -v
+RUN node -v
+# install bitwarden cli
+RUN npm install -g @bitwarden/[email protected]
+# checking bw version also initializes the bw config
+RUN bw --version
COPY . /app