I'm currently using Ubuntu 24.04 but need to install Freesurfer, which only works on Ubuntu 22. I found out from a discussion that there's a Docker image that could help with this. However, I'm not entirely sure how to set it up. Can someone walk me through the steps of using Docker for this? Any specific instructions would be greatly appreciated!
5 Answers
If you’re looking at the cgvalle/freesurfer_vnc image, definitely check out the GitHub page for it. It appears to have a minimal desktop setup with VNC, which is perfect for interacting with Freesurfer. You can run that image without worrying about your host OS version. Just follow the instructions there and you should be good!
Start your learning journey with Docker by checking their official documentation. They have great getting-started guides. If you still struggle specifically with Freesurfer, check out their support forums too.
You might consider checking out "incus". It’s a cool hybrid of Docker and Proxmox that allows you to create simple containers or tiny VMs without complex scripts. It integrates Docker images without extra hassle. It could be exactly what you need!
You can definitely create a Docker image using Ubuntu 22 for Freesurfer! Start by creating a Dockerfile that specifies the Ubuntu 22 image, then install your required packages. Here’s a basic template you could use:
```
FROM ubuntu:22.04
# install your packages
RUN apt-get install ...
# Expose a port
EXPOSE 80
# Command to run when the container starts
CMD ["bash ...."]
```
After that, build your Docker image with:
```
docker build -t ubuntu-app .
```
Then run your container like this:
```
docker run -d -p 80:80 ubuntu-app
```
Just a heads up, make sure to check the required port or command in the documentation for Freesurfer!
You might need to tweak the package sources if you’re working with an older version of Ubuntu. Look into using old-releases.ubuntu.com to point your apt to the right sources before you install your packages.
If Docker feels too complex, you could just run a virtual machine with the older Ubuntu ISO and install the app there. It might be simpler if you’re facing too many Docker issues.

Yep, all you need to do is install Docker and run the command like this:
```
docker run -d
--name freesurfer_vnc
-e VNC_PASSWORD=mypassword
-e SUBJECTS_DIR=/root/persistent/subjects
-v $HOME/docker/freesurfer_VNC:/root/persistent
-p 6080:80 -p 5900:5900
cgvalle/freesurfer_vnc:latest
```