summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2022-02-15 13:59:15 +0000
committerGitHub <noreply@github.com>2022-02-15 13:59:15 +0000
commit5598556b776e3c8cc93b8ede4af9f2f5b21ff935 (patch)
tree463f1eb1d515b8c1055809918da09dab40dc2ba7
parentRefactor search code to reduce function size. (#11991) (diff)
downloadsynapse-5598556b776e3c8cc93b8ede4af9f2f5b21ff935.tar.xz
Docker: remove `VOLUME` directive (#11997)
The driver for this is to stop Complement complaining about it, but as far as I can tell it was pointless and needed to go away anyway.

I'm a bit unclear about what exactly VOLUME does, but I think what it means is that, if you don't override it with an explicit -v argument, then docker run will create a temporary volume, and copy things into it. The temporary volume is then deleted when the container finishes.

That only sounds useful if your image has something to copy into it (otherwise you may as well just use the default root filesystem), and our image notably doesn't copy anything into /data.

So... this wasn't doing anything, except annoying Complement?

Diffstat (limited to '')
-rw-r--r--changelog.d/11997.docker1
-rw-r--r--docker/Dockerfile2
2 files changed, 1 insertions, 2 deletions
diff --git a/changelog.d/11997.docker b/changelog.d/11997.docker
new file mode 100644
index 0000000000..1b3271457e
--- /dev/null
+++ b/changelog.d/11997.docker
@@ -0,0 +1 @@
+The docker image no longer automatically creates a temporary volume at `/data`. This is not expected to affect normal usage.
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 306f75ae56..e4c1c19b86 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -98,8 +98,6 @@ COPY --from=builder /install /usr/local
 COPY ./docker/start.py /start.py
 COPY ./docker/conf /conf
 
-VOLUME ["/data"]
-
 EXPOSE 8008/tcp 8009/tcp 8448/tcp
 
 ENTRYPOINT ["/start.py"]