Skip to content

Commit

Permalink
Adding docker/podman
Browse files Browse the repository at this point in the history
  • Loading branch information
stebo85 committed Mar 26, 2022
1 parent 1a2fd4c commit c955979
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions content/en/docs/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: "Installing and Using Docker"
linkTitle: "Docker"
weight: 100
description: >-
Installing and using Docker
---


## Overview
Docker (or a software container in general) is great for reproducibility and making it easy to move your tools in and out of the cloud. If you don't know what containers are, here is a 3 minute explanation: https://www.youtube.com/watch?v=HelrQnm3v4g

## Installing Docker
Docker is not installed by default on Oracle Linux. You could install the original Docker, but podman is fully compatible and is the default in Oracle Linux (and some argue it's even better). This is how to do it:

```
sudo yum install docker
```

Now you can run docker, but it will tell you that this is actually podman:
```
docker
```
![image](https://user-images.githubusercontent.com/4021595/160227312-43836181-cd0c-4d26-bc18-9ccc9fb0f700.png)

Let's remove that msg:
```
sudo touch /etc/containers/nodocker
```

Now we have docker/podman installed and we can test it:
```
docker run hello-world
```
![image](https://user-images.githubusercontent.com/4021595/160227372-0012e396-a2ca-4f80-8455-d4b2c8616b19.png)


and we could now run everything we like, e.g. https://neurodesk.github.io/docs/neurodesktop/getting-started/linux/
```
mkdir /home/opc/neurodesktop-storage
sudo docker run \
--shm-size=1gb -it --privileged --name neurodesktop \
-v ~/neurodesktop-storage:/neurodesktop-storage \
-e HOST_UID="$(id -u)" -e HOST_GID="$(id -g)"\
-p 8080:8080 \
-h neurodesktop-20220302 docker.io/vnmd/neurodesktop:20220302
```

and this is how easy it is to run a container on the cloud :)

if you connect to your cloud instance using a port-forwarding `ssh -L 8080:127.0.0.1:8080 opc@xxx.xx.xx.xx` then you could now use Neurodesktop via visiting http://localhost:8080/#/?username=user&password=password in your local browser. When done, stop the container with CTRL-C and run `sudo docker rm neurodesktop` to cleanup.

0 comments on commit c955979

Please sign in to comment.