Skip to content

lsif-server: correct file permissions when deployed in Docker Compose or pure-docker deployments

Warren Gifford requested to merge sg/lsif-server-perms into master

Created by: slimsag

This fixes lsif-server in Docker Compose and pure-docker deployments. There is zero change in functionality for Kubernetes or any other deployment types.

See the inline comment for an explanation of why this is needed. Unfortunately, we do not have testing in place for this today (I hope to get some in the future) so for now I just ask we all be mindful of ensuring a mkdir && chown command exists in the Dockerfile for any volume-mounted directories a service will try to use.

We will do more extensive testing of Docker Compose at release time in the future, in order to catch issues like this, as well.

I have already published this change as:

index.docker.io/sourcegraph/lsif-server:3.14.0-1@sha256:ed683d2579d807458a892eab2f88fa5618b82a1ae7af02d5e7de1af3f6eea4a7

By modifying the base image by hand:

docker run --name=base -d sourcegraph/lsif-server:3.14.0
docker exec -u 0 -it base sh -c 'mkdir -p /lsif-storage && chown -R sourcegraph:sourcegraph /lsif-storage'
docker commit base sourcegraph/lsif-server:3.14.0-1
docker rm -f base

So that I can release v3.14.0-1 of docker-compose for a customer who is facing this.

Merge request reports

Loading