Facilite o gerenciamento de contêineres com o Cockpit

“Make Container Management Easy With Cockpit”

Cockpit can be installed on DebianRed HatCentOS, and Ubuntu. Here, I will focus on installing the system on a Ubuntu 16.04 server that already includes Docker.

Installation

https://gist.github.com/lucenarenato/93332e5034f46f3b87b9521c5f175a12

# Cockpit

## Debian
> Cockpit is included in Debian unstable and in backports for 9 (Stretch).
> For Debian 9 you have to enable the backports repository:
```sh
echo 'deb http://deb.debian.org/debian stretch-backports main' > \
 /etc/apt/sources.list.d/backports.list

apt-get update

sudo apt-get install cockpit
sudo apt-get install cockpit-docker

```
## Ubuntu
> Cockpit is included in Ubuntu 17.04 and later, and available as an official backport for 16.04 LTS and later. Backports are enabled by default, but if you customized apt sources you might need to enable them manually.

```
sudo apt-get install cockpit

```
## Cockpit on an instance of Ubuntu 16.04, with Docker already running
```
sudo add-apt-repository ppa:cockpit-project/cockpit
sudo apt-get get update
sudo apt-get -y install cockpit cockpit-docker
sudo systemctl start cockpit
sudo systemctl enable cockpit
```

## CentOS
> Cockpit is included in CentOS 7.x:
```
sudo yum install cockpit

sudo systemctl enable --now cockpit.socket

sudo firewall-cmd --permanent --zone=public --add-service=cockpit
sudo firewall-cmd --reload
```

## Red Hat Enterprise Linux
```
sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo yum install cockpit
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --add-service=cockpit
sudo firewall-cmd --add-service=cockpit --permanent
```
## Fedora
> Cockpit comes installed by default in Fedora Server.

```
sudo dnf install cockpit
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --add-service=cockpit
sudo firewall-cmd --add-service=cockpit --permanent
```
# Cockpit service and then enable it so it auto-starts at boot
- shell
```sh
sudo systemctl start cockpit
sudo systemctl enable cockpit
```
## Logging into Cockpit
*  http://IP_OF_SERVER:9090


## Stop / remove all Docker containers
```
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
```
### Para parar apenas os contêineres encerrados e excluir apenas imagens não marcadas:
```
docker ps --filter 'status=Exited' -a | xargs docker stop docker images --filter "dangling=true" -q | xargs 
docker rmi
```

https://cockpit-project.org/images/site/os-debian.svg
https://cockpit-project.org/images/site/os-ubuntu.svg

https://cockpit-project.org/running
Make Container Management Easy With Cockpit
http://www.projectatomic.io/download/
Created with GIMP
Created with GIMP
Created with GIMP
Created with GIMP

Renato Lucena

Developer PHP, Laravel. Goiania-GO https://www.linkedin.com/in/renato-de-oliveira-lucena-33777133/

Você pode gostar...