diff --git a/docker/local/Dockerfile b/docker/local/Dockerfile index ec7a1db0f9d..b5f96f62c36 100644 --- a/docker/local/Dockerfile +++ b/docker/local/Dockerfile @@ -34,6 +34,10 @@ ENV PATH="/var/opt/etcd:${PATH}" RUN mkdir /vt/local COPY examples/local /vt/local +# Copy the vtadmin web app to the correct location and npm install +COPY --chown=vitess:vitess web /web +RUN npm install /web/vtadmin + RUN mkdir /vt/common COPY examples/common /vt/common diff --git a/docker/local/install_local_dependencies.sh b/docker/local/install_local_dependencies.sh index b723ee99452..e570d0dc196 100755 --- a/docker/local/install_local_dependencies.sh +++ b/docker/local/install_local_dependencies.sh @@ -3,7 +3,7 @@ # This is a script that gets run as part of the Dockerfile build # to install dependencies for the vitess/mini image. # -# Usage: install_mini_dependencies.sh +# Usage: install_local_dependencies.sh set -euo pipefail @@ -20,3 +20,6 @@ mkdir -p /var/run/etcd && chown -R vitess:vitess /var/run/etcd # Clean up files we won't need in the final image. rm -rf /var/lib/apt/lists/* + +# Install npm and node dependencies for vtadmin +curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && apt-get install -y nodejs diff --git a/docker/local/run.sh b/docker/local/run.sh index 23a97f9843c..9239748ff81 100755 --- a/docker/local/run.sh +++ b/docker/local/run.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker run -p 15000:15000 -p 15001:15001 -p 15991:15991 -p 15999:15999 -p 16000:16000 --rm -it vitess/local +docker run -p 14201:14201 -p 15000:15000 -p 15001:15001 -p 15991:15991 -p 15999:15999 -p 16000:16000 --rm -it vitess/local