Skip to content

Commit

Permalink
Fixes for local docker environment (#12382)
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Lim <[email protected]>
  • Loading branch information
andylim-duo authored Feb 21, 2023
1 parent 3eaf352 commit ce9f70b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docker/local/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion docker/local/install_local_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
2 changes: 1 addition & 1 deletion docker/local/run.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ce9f70b

Please sign in to comment.