0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PortainerでDockerコンテナの一元管理を行う

Posted at

Dockeのコンテナ管理のため、WebUIを導入することに。
調べてみると色々なUIツールが存在し、今回はPortainerをインストールしてみたいと思う。
取り急ぎ構築備忘のため、簡単に手順をメモ。

インストール

次のようにdocker-compose.yamlを作成。

docker-compose.yaml
version: '3.2'
services:
  portainer:
    image: portainer/portainer-ce
    ports:
      - "127.0.0.1:9000:9000"
      - "8000:8000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - data:/data
    restart: always

volumes:
  data:

nginxリバースプロキシ設定

nginx.conf
location /portainer/ {
    proxy_pass http://localhost:9000/;
}

nginxのpermission denied対応

http://xx.xx.xx.xx/portainer/でアクセスするとpermission deniedが表示された。
SElinuxのログをチェックしてみると、deniedログが存在。

$ tail -f /var/log/audit/audit.log

下記のようにhttpd_can_network_connectのパラメータを変更したら解決した。

$ setsebool -P httpd_can_network_connect 1

参考

https://docs.portainer.io/v/ce-2.11/
https://github.com/portainer/portainer
https://tech.mktime.com/entry/447

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?