Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Ruunig Che and Che worksapce as non root user.

The goal is to have the content of the main container’s /projects shared between the main container and its sidecars.

https://docs.docker.com/storage/volumes/ indicates that it is possible to do so but it did not work for me.

I created an image, added /projects and some contents under the directory. But once the workspace is up and running the contents do not appear in /projects.


As already pointed out by Serhii that's not how volumes work unfortunately. If you mount /projects, the original image /projects folder content will be replaced with the content of the volume. 

A simple example of the content of the /var/ folder in a fedora container (original content and contente when mounted):

~ $ docker run -ti --rm fedora ls /var/
adm    db     ftp    gopher    lib    lock  mail  opt     run    tmp
cache  empty  games  kerberos  local  log   nis   preserve  spool  yp
~ $ docker run -ti --rm -v ~/newdir:/var/  fedora ls /var/
 
 

Back to the top