Files
docs/Container Documentation/Portainer/Deploy Portainer.md
Nicole Rappe b9aeaabbfb Initial Commit
Bringing Documentation into Gitea
2023-12-21 01:15:09 -07:00

31 lines
1.3 KiB
Markdown

### Update The Package Manager
We need to update the server before installing Docker
```jsx title="Ubuntu Server"
sudo apt update
sudo apt upgrade
```
```jsx title="Rocky Linux"
sudo dnf check-update
```
### Deploy Docker
Install Docker then deploy Portainer
```jsx title="Ubuntu Server"
sudo apt install docker.io
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /srv/containers/portainer:/data portainer/portainer-ee:latest
```
```jsx title="Rocky Linux"
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /srv/containers/portainer:/data portainer/portainer-ee:latest
```
### Configure Docker Network
We want to use a dedicated subnet / network specifically for containers, so they don't trample over the **SERVER** and **LAN** networks. If you are unsure of the name of the network adapter, in this case `eth0`, just type `ipaddr` in the terminal to list the network interfaces to locate it.
```
docker network create -d macvlan --subnet=192.168.5.0/24 --gateway=192.168.5.1 -o parent=eth0 docker_network
```