1. Create a VM
2. Inside the VM you have to install docker, openssh-server and ncat?
For ubuntu:
$ sudo apt install docker.io
$ sudo apt install openssh-server
$ sudo apt install ncat
To use docker has non-root add the user to the docker group inside your VM
like this.
$ sudo usermod -aG docker $(whoami)
Do not forget to logout and login are it may not work with your account
To check if docker is running type the following
$ systemctl status docker
3. Then in your XCP-ng host you have to install xscontainer
Like this:
$ yum install xscontainer
Followed by executing
$ xe-toolstack-restart
to restart the toolstack
and use the following command
$ xscontainer-prepare-vm -v vmuuid -u christophe
4. Test your VM with container tab
$ sudo docker run hello-world
5. To install portainer execute the following command on your VM
$ sudo docker volume create portainer_data
$ sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data portainer/portainer
Check the container tab.
Try portainer ip:9000 in your browser.
Comments
Post a Comment