From 2bbb334b5dcaf75b7e83a66ca5eae93fe17f7bd2 Mon Sep 17 00:00:00 2001 From: Brian Blonski Date: Thu, 18 Jul 2024 17:40:06 -0700 Subject: [PATCH] update docker configuration --- Dockerfile | 12 +++++------- README.md | 10 +++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 53b1def..f097fe9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,13 @@ -FROM node:10-alpine +FROM node:20-alpine +WORKDIR /gremlin-visualizer +ADD . . RUN npm cache clean --force && \ npm config set strict-ssl false && \ - apk add wget unzip && \ - wget --no-check-certificate https://github.com/SRI-International/gremlin-visualizer/archive/master.zip && \ - unzip master.zip && \ - cd gremlin-visualizer-master && \ npm install EXPOSE 3000 3001 -WORKDIR /gremlin-visualizer-master - +ENV HOST='0.0.0.0' +ENV BROWSER='None' CMD npm start diff --git a/README.md b/README.md index 9118c37..d4c3158 100644 --- a/README.md +++ b/README.md @@ -33,17 +33,13 @@ The Docker image can be built by calling the `docker build` command, for example docker build --tag=gremlin-visualizer:latest . ``` -```sh -docker pull prabushitha/gremlin-visualizer:latest -``` - The Docker image can then be run by calling `docker run` and exposing the necessary ports for communication. See [Docker's documentation](https://docs.docker.com/engine/reference/commandline/run/) for more options on how to run the image. ```sh -# if you built the image yourself -docker run --rm -d -p 3000:3000 -p 3001:3001 --name=gremlin-visualizer --network=host gremlin-visualizer:latest +docker run --rm -d -p 3000:3000 -p 3001:3001 --name=gremlin-visualizer --add-host=host.docker.internal:host-gateway gremlin-visualizer:latest ``` -Note that `--network=host` is not needed if you don't run your gremlin server in the host machine. +Note that `--add-host=host.docker.internal:host-gateway` is not needed if you don't run your gremlin server in the host machine. +If trying to access a gremlin server on `localhost`, set `host.docker.internal` in the gremlin-visualizer settings instead. The Docker container can be stopped by calling `docker stop gremlin-visualizer`.