spinalcordtoolbox / sct_docker

Docker distribution of Spinal Cord Toolbox
3 stars 3 forks source link

Add text editor in container #38

Open jcohenadad opened 5 years ago

jcohenadad commented 5 years ago

One current issue, for users following SCT course and using Docker, is that they need to edit the file parameters.sh from the multi_subject course. Currently there is no obvious way for them to edit this file.

What are the installed text editor?

If none is installed, I suggest to add vim while building the container.

YangHee-Min commented 5 years ago

@jcohenadad Should we follow the steps included (here) to install vim within the container and to be able to edit parameters.sh?

jcohenadad commented 5 years ago

@YangHee-Min before doing so, could you please confirm that there is no text editor available?

ideally i would like to avoid re-doing the build, upload, test, etc. i have other things to do today...

YangHee-Min commented 5 years ago

@jcohenadad As explained in the first line of the first answer in this link, there does not seem to be a default editor. There is a way to edit files within docker as explained (here) but it involves replacing lines if ever you want to try that route (although it clearly has limitations). Unfortunately, most threads seem to suggest to use an external text editor to edit files.

YangHee-Min commented 5 years ago

@jcohenadad Options 2 and 3 in (this link) seem to suggest a method to edit files within docker (or at least the files are called internally) without the use of text editors.

jcohenadad commented 5 years ago

@YangHee-Min, OK, so in the future, we should add an editor by adding those lines in the container build:

apt-get update  # check if not added before...
apt-get install vim

for now, since we are running out of time for the SCT course, let's just ask users to run those lines once they enter the container.