You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using your TF2 image relying on this one, but the VOLUME ${STEAMCMDDIR} command causes the image contents to be copied on the host in an anonymous volume with ~300MB, and this is duplicated each time the container is restarded, finally causing a huge and useless disk usage or requires regular cleanup:
Overwriting this volume with a customized host directory doesn't work because in this case, the image contents is not copied, so the directory is empty and the image doesn't start.
Is there any good reason for duplicating the image contents on the host, knowing it doesn't bring persistence between container executions or would it be possible to remove this VOLUME instruction ?
Thanks!
The text was updated successfully, but these errors were encountered:
I assume with restarting you mean recreating the container which causes it to allocate a new volume (which is intended behaviour). The image doesn't have bind mount support, as you already noticed, because it really doesn't need it. What you are looking for is a named volume:
$ docker volume create steamcmd_volume # Create named volume
$ docker run -it -v "steamcmd_volume:/home/steam/steamcmd" --name=steamcmd cm2network/steamcmd bash # Start the container with the volume mounted
This way it will remain persistent over container recreations. You can even mount the same named steamcmd volume into multiple containers. That way you save space by using the same installation for multiple game servers. (I used this extensively in my steampipe image).
As to the reason why the VOLUME instruction is there, simply because a steamcmd installation is not static content, each time you launch it, it updates itself. Remember in the regular docker storage driver it will create a new layer for every change. So each update to steamcmd would keep growing the layers unnecessarily.
I'm using your TF2 image relying on this one, but the
VOLUME ${STEAMCMDDIR}
command causes the image contents to be copied on the host in an anonymous volume with ~300MB, and this is duplicated each time the container is restarded, finally causing a huge and useless disk usage or requires regular cleanup:Overwriting this volume with a customized host directory doesn't work because in this case, the image contents is not copied, so the directory is empty and the image doesn't start.
Is there any good reason for duplicating the image contents on the host, knowing it doesn't bring persistence between container executions or would it be possible to remove this VOLUME instruction ?
Thanks!
The text was updated successfully, but these errors were encountered: