Skip to content

Commit

Permalink
update docker configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-at-sri committed Jul 19, 2024
1 parent 93c9a67 commit 2bbb334
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down

0 comments on commit 2bbb334

Please sign in to comment.