Skip to content

Add a Dockerfile that makes it easier to start with `sg`

Created by: grzesiek

Description

This adds a simple Dockerfile that makes it easier to start hacking with sg on Linux in an isolated environment.

How to use it

$ docker build . -f dev/sg/Dockerfile -t sgk:latest
$ docker run -d -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/sourcegraph/:/opt/sourcegraph --name sgk sgk:latest
$ docker exec -ti sgk bash
$ sg doctor
✅ Check "docker" success!
✅ Check "redis" success!
✅ Check "postgres" success!

Caveats

It still does not support running sg start successfully:

  1. Needs some tweaks around nvm to ensure that there is no node.js version mismatch
  2. SG seems to require an enterprise edition license key to be present in ../dev-private/enterprise/dev/test-license-generation-key.pem to start the development environment
  3. It might never work, I wanted to try running sg in a container :)

/cc @mrnugget

Merge request reports

Loading