ソースを参照

Add Clamav to template (#118)

Macley 2 年 前
コミット
9b2892e5de

+ 2 - 1
docs/AppList.md

@@ -4,7 +4,7 @@ List of all apps included in this project with info related to it.
 
 |**Arm32:**          |**Arm64:**|**Amd64:**|**Total:**|
 |:-------------------|:--------:|:--------:|:--------:|
-| 186 apps | 205 apps | 203 apps | 205 apps |
+| 187 apps | 206 apps | 204 apps | 206 apps |
 
 ---
 
@@ -31,6 +31,7 @@ List of all apps included in this project with info related to it.
 |[Cardigann](https://github.com/cardigann/cardigann)|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|Container| [![](../build/images/blue_doc_icon.png)](https://hub.docker.com/r/linuxserver/cardigann/) |  |  |  |
 |[Chevereto](https://chevereto.com/)|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|Container| [![](../build/images/blue_doc_icon.png)](https://hub.docker.com/r/nmtan/chevereto) |  |  |  |
 |[Chrony NTP](https://github.com/cturra/docker-ntp)|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|Container| [![](../build/images/blue_doc_icon.png)](https://github.com/cturra/docker-ntp/blob/main/README.md) |  |  |  |
+|[Clamav](https://docs.clamav.net/)|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|Container| [![](../build/images/blue_doc_icon.png)](https://hub.docker.com/r/mkodockx/docker-clamav) |  | [![](../build/images/script_icon.png)](../tools/install_clamav.sh) |  |
 |[Cloudflare DDNS](https://www.cloudflare.com/en-gb/learning/dns/glossary/dynamic-dns/)|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|Container| [![](../build/images/blue_doc_icon.png)](https://github.com/favonia/cloudflare-ddns/) |  |  |  |
 |[Cloudflared Tunnel](https://www.cloudflare.com/products/tunnel/)|:x:|:heavy_check_mark:|:heavy_check_mark:|Container| [![](../build/images/blue_doc_icon.png)](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/) |  |  |  |
 |[Code Server](https://coder.com/)|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|Container| [![](../build/images/blue_doc_icon.png)](https://docs.linuxserver.io/images/docker-code-server) |  |  |  |

+ 1 - 1
docs/DocumentList.md

@@ -8,7 +8,7 @@ List of all Documents used within this project with related Apps and Videos.
 | File Name | Description | Related Apps | YouTube |
 | --------- | ----------- | ------------ |:-------:|
 |[macvlan_setup.md](../docs/macvlan_setup.md)|Attach a container directly to local network (macvlan)|||
-|[nginx_proxy_manager.md](../docs/nginx_proxy_manager.md)|Install and setup instructions for Nginx Proxy Manager (NPM)|Nginx Proxy Manager v2 with Mysql and Goaccess Charts [DEPRECATED]<br>Nginx Proxy Manager v3 [DEVEL] NOT READY FOR USE<br>Nginx Proxy Manager v2 with Sqllite<br>Nginx Proxy Manager v2 with Mysql [DEPRECATED]<br>Nginx Proxy Manager v2 with Sqlite and Goaccess Charts|[![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=plastic&logo=youtube&logoColor=white)]("https://www.youtube.com/watch?v=yl2Laxbqvo8&list=PL846hFPMqg3jwkxcScD1xw2bKXrJVvarc&index=10")|
+|[nginx_proxy_manager.md](../docs/nginx_proxy_manager.md)|Install and setup instructions for Nginx Proxy Manager (NPM)|Nginx Proxy Manager v2 with Mysql and Goaccess Charts [DEPRECATED]<br>Nginx Proxy Manager v2 with Sqlite and Goaccess Charts<br>Nginx Proxy Manager v3 [DEVEL] NOT READY FOR USE<br>Nginx Proxy Manager v2 with Mysql [DEPRECATED]<br>Nginx Proxy Manager v2 with Sqllite|[![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=plastic&logo=youtube&logoColor=white)]("https://www.youtube.com/watch?v=yl2Laxbqvo8&list=PL846hFPMqg3jwkxcScD1xw2bKXrJVvarc&index=10")|
 |[photoprism.md](../docs/photoprism.md)|Install and Setup Instructions for PhotoPrism Stack|PhotoPrism||
 |[pi-hole.md](../docs/pi-hole.md)|Install and Setup Pi-Hole for Network-Wide Ad Block|Pi-Hole DoH/DoT<br>Pi-Hole-Unbound<br>Pi-Hole||
 |[rpi_docker_monitor.md](../docs/rpi_docker_monitor.md)|Install and setup instructions for the RPI Docker Monitor|Raspberry Pi Docker Monitor|[![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=plastic&logo=youtube&logoColor=white)]("https://www.youtube.com/watch?v=IoD3vFuep64&list=PL846hFPMqg3jwkxcScD1xw2bKXrJVvarc&index=8")|

+ 36 - 0
pi-hosted_template/template/portainer-v2.json

@@ -786,6 +786,42 @@
 			"type": 1,
 			"note": "<b>Template created by Pi-Hosted Series</b><br><b>Check our Github page: <a href=\"https://github.com/pi-hosted/pi-hosted\" target=\"_blank\">https://github.com/pi-hosted/pi-hosted</a></b><br><br><b>Official Webpage: </b><a href=\"https://github.com/cturra/docker-ntp\" target=\"_blank\">https://github.com/cturra/docker-ntp</a><br><b>Official Docker Documentation: </b><a href=\"https://github.com/cturra/docker-ntp/blob/main/README.md\" target=\"_blank\">https://github.com/cturra/docker-ntp/blob/main/README.md</a><br><br><br>"
 		},
+		{
+			"categories": [
+				"Other",
+				"Anitvirus"
+			],
+			"description": "ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.",
+			"image": "mkodockx/docker-clamav:alpine",
+			"logo": "http://www.clamav.net/assets/clamav-trademark.png",
+			"name": "clamav",
+			"platform": "linux",
+			"ports": [
+				"3310:3310/tcp"
+			],
+			"restart_policy": "unless-stopped",
+			"title": "Clamav",
+			"type": 1,
+			"volumes": [
+				{
+					"bind": "/etc/timezone",
+					"container": "/etc/timezone"
+				},
+				{
+					"bind": "/etc/localtime",
+					"container": "/etc/localtime"
+				},
+				{
+					"bind": "/portainer/Files/AppData/Config/clamav/config",
+					"container": "/etc/clamav"
+				},
+				{
+					"bind": "/portainer/Files/AppData/Config/clamav/virus_definitions",
+					"container": "/var/lib/clamav"
+				}
+			],
+			"note": "<b>Template created by Pi-Hosted Series</b><br><b>Check our Github page: <a href=\"https://github.com/pi-hosted/pi-hosted\" target=\"_blank\">https://github.com/pi-hosted/pi-hosted</a></b><br><br><b>Official Webpage: </b><a href=\"https://docs.clamav.net/\" target=\"_blank\">https://docs.clamav.net/</a><br><b>Official Docker Documentation: </b><a href=\"https://hub.docker.com/r/mkodockx/docker-clamav\" target=\"_blank\">https://hub.docker.com/r/mkodockx/docker-clamav</a><br><br><h3><b><a href=\"https://github.com/pi-hosted/pi-hosted/blob/master/tools/install_clamav.sh\" target=\"_blank\">Pre-installation script</a> must be RAN before you install: </b>wget -qO- https://raw.githubusercontent.com/pi-hosted/pi-hosted/master/tools/install_clamav.sh | bash</h3><br><br>"
+		},
 		{
 			"categories": [
 				"DNS",

+ 41 - 0
template/apps/clamav.json

@@ -0,0 +1,41 @@
+{
+	"categories": [
+		"Other",
+		"Anitvirus"
+	],
+	"description": "ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.",
+	"image_arm32": "mkodockx/docker-clamav:alpine",
+	"image_arm64": "mkodockx/docker-clamav:alpine",
+	"image_amd64": "mkodockx/docker-clamav:alpine",
+	"logo": "http://www.clamav.net/assets/clamav-trademark.png",
+	"name": "clamav",
+	
+	"officialDoc": "https://hub.docker.com/r/mkodockx/docker-clamav",
+	"preInstallScript": "install_clamav.sh",
+	"platform": "linux",
+	"ports": [
+		"3310:3310/tcp"
+	],
+	"restart_policy": "unless-stopped",
+	"title": "Clamav",
+	"type": 1,
+	"volumes": [
+		{
+			"bind": "/etc/timezone",
+			"container": "/etc/timezone"
+		},
+		{
+			"bind": "/etc/localtime",
+			"container": "/etc/localtime"
+		},
+		{
+	      		"bind": "/portainer/Files/AppData/Config/clamav/config",
+			"container": "/etc/clamav"
+		},
+		{
+      			"bind": "/portainer/Files/AppData/Config/clamav/virus_definitions",
+			"container": "/var/lib/clamav"
+		}
+	],
+	"webpage": "https://docs.clamav.net/"
+}

+ 36 - 0
template/portainer-v2-amd64.json

@@ -949,6 +949,42 @@
 			"type": 1,
 			"note": "<b>Template created by Pi-Hosted Series</b><br><b>Check our Github page: <a href=\"https://github.com/pi-hosted/pi-hosted\" target=\"_blank\">https://github.com/pi-hosted/pi-hosted</a></b><br><br><b>Official Webpage: </b><a href=\"https://github.com/cturra/docker-ntp\" target=\"_blank\">https://github.com/cturra/docker-ntp</a><br><b>Official Docker Documentation: </b><a href=\"https://github.com/cturra/docker-ntp/blob/main/README.md\" target=\"_blank\">https://github.com/cturra/docker-ntp/blob/main/README.md</a><br><br><br>"
 		},
+		{
+			"categories": [
+				"Other",
+				"Anitvirus"
+			],
+			"description": "ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.",
+			"image": "mkodockx/docker-clamav:alpine",
+			"logo": "http://www.clamav.net/assets/clamav-trademark.png",
+			"name": "clamav",
+			"platform": "linux",
+			"ports": [
+				"3310:3310/tcp"
+			],
+			"restart_policy": "unless-stopped",
+			"title": "Clamav",
+			"type": 1,
+			"volumes": [
+				{
+					"bind": "/etc/timezone",
+					"container": "/etc/timezone"
+				},
+				{
+					"bind": "/etc/localtime",
+					"container": "/etc/localtime"
+				},
+				{
+					"bind": "/portainer/Files/AppData/Config/clamav/config",
+					"container": "/etc/clamav"
+				},
+				{
+					"bind": "/portainer/Files/AppData/Config/clamav/virus_definitions",
+					"container": "/var/lib/clamav"
+				}
+			],
+			"note": "<b>Template created by Pi-Hosted Series</b><br><b>Check our Github page: <a href=\"https://github.com/pi-hosted/pi-hosted\" target=\"_blank\">https://github.com/pi-hosted/pi-hosted</a></b><br><br><b>Official Webpage: </b><a href=\"https://docs.clamav.net/\" target=\"_blank\">https://docs.clamav.net/</a><br><b>Official Docker Documentation: </b><a href=\"https://hub.docker.com/r/mkodockx/docker-clamav\" target=\"_blank\">https://hub.docker.com/r/mkodockx/docker-clamav</a><br><br><h3><b><a href=\"https://github.com/pi-hosted/pi-hosted/blob/master/tools/install_clamav.sh\" target=\"_blank\">Pre-installation script</a> must be RAN before you install: </b>wget -qO- https://raw.githubusercontent.com/pi-hosted/pi-hosted/master/tools/install_clamav.sh | bash</h3><br><br>"
+		},
 		{
 			"categories": [
 				"DNS",

+ 36 - 0
template/portainer-v2-arm32.json

@@ -786,6 +786,42 @@
 			"type": 1,
 			"note": "<b>Template created by Pi-Hosted Series</b><br><b>Check our Github page: <a href=\"https://github.com/pi-hosted/pi-hosted\" target=\"_blank\">https://github.com/pi-hosted/pi-hosted</a></b><br><br><b>Official Webpage: </b><a href=\"https://github.com/cturra/docker-ntp\" target=\"_blank\">https://github.com/cturra/docker-ntp</a><br><b>Official Docker Documentation: </b><a href=\"https://github.com/cturra/docker-ntp/blob/main/README.md\" target=\"_blank\">https://github.com/cturra/docker-ntp/blob/main/README.md</a><br><br><br>"
 		},
+		{
+			"categories": [
+				"Other",
+				"Anitvirus"
+			],
+			"description": "ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.",
+			"image": "mkodockx/docker-clamav:alpine",
+			"logo": "http://www.clamav.net/assets/clamav-trademark.png",
+			"name": "clamav",
+			"platform": "linux",
+			"ports": [
+				"3310:3310/tcp"
+			],
+			"restart_policy": "unless-stopped",
+			"title": "Clamav",
+			"type": 1,
+			"volumes": [
+				{
+					"bind": "/etc/timezone",
+					"container": "/etc/timezone"
+				},
+				{
+					"bind": "/etc/localtime",
+					"container": "/etc/localtime"
+				},
+				{
+					"bind": "/portainer/Files/AppData/Config/clamav/config",
+					"container": "/etc/clamav"
+				},
+				{
+					"bind": "/portainer/Files/AppData/Config/clamav/virus_definitions",
+					"container": "/var/lib/clamav"
+				}
+			],
+			"note": "<b>Template created by Pi-Hosted Series</b><br><b>Check our Github page: <a href=\"https://github.com/pi-hosted/pi-hosted\" target=\"_blank\">https://github.com/pi-hosted/pi-hosted</a></b><br><br><b>Official Webpage: </b><a href=\"https://docs.clamav.net/\" target=\"_blank\">https://docs.clamav.net/</a><br><b>Official Docker Documentation: </b><a href=\"https://hub.docker.com/r/mkodockx/docker-clamav\" target=\"_blank\">https://hub.docker.com/r/mkodockx/docker-clamav</a><br><br><h3><b><a href=\"https://github.com/pi-hosted/pi-hosted/blob/master/tools/install_clamav.sh\" target=\"_blank\">Pre-installation script</a> must be RAN before you install: </b>wget -qO- https://raw.githubusercontent.com/pi-hosted/pi-hosted/master/tools/install_clamav.sh | bash</h3><br><br>"
+		},
 		{
 			"categories": [
 				"DNS",

+ 36 - 0
template/portainer-v2-arm64.json

@@ -949,6 +949,42 @@
 			"type": 1,
 			"note": "<b>Template created by Pi-Hosted Series</b><br><b>Check our Github page: <a href=\"https://github.com/pi-hosted/pi-hosted\" target=\"_blank\">https://github.com/pi-hosted/pi-hosted</a></b><br><br><b>Official Webpage: </b><a href=\"https://github.com/cturra/docker-ntp\" target=\"_blank\">https://github.com/cturra/docker-ntp</a><br><b>Official Docker Documentation: </b><a href=\"https://github.com/cturra/docker-ntp/blob/main/README.md\" target=\"_blank\">https://github.com/cturra/docker-ntp/blob/main/README.md</a><br><br><br>"
 		},
+		{
+			"categories": [
+				"Other",
+				"Anitvirus"
+			],
+			"description": "ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.",
+			"image": "mkodockx/docker-clamav:alpine",
+			"logo": "http://www.clamav.net/assets/clamav-trademark.png",
+			"name": "clamav",
+			"platform": "linux",
+			"ports": [
+				"3310:3310/tcp"
+			],
+			"restart_policy": "unless-stopped",
+			"title": "Clamav",
+			"type": 1,
+			"volumes": [
+				{
+					"bind": "/etc/timezone",
+					"container": "/etc/timezone"
+				},
+				{
+					"bind": "/etc/localtime",
+					"container": "/etc/localtime"
+				},
+				{
+					"bind": "/portainer/Files/AppData/Config/clamav/config",
+					"container": "/etc/clamav"
+				},
+				{
+					"bind": "/portainer/Files/AppData/Config/clamav/virus_definitions",
+					"container": "/var/lib/clamav"
+				}
+			],
+			"note": "<b>Template created by Pi-Hosted Series</b><br><b>Check our Github page: <a href=\"https://github.com/pi-hosted/pi-hosted\" target=\"_blank\">https://github.com/pi-hosted/pi-hosted</a></b><br><br><b>Official Webpage: </b><a href=\"https://docs.clamav.net/\" target=\"_blank\">https://docs.clamav.net/</a><br><b>Official Docker Documentation: </b><a href=\"https://hub.docker.com/r/mkodockx/docker-clamav\" target=\"_blank\">https://hub.docker.com/r/mkodockx/docker-clamav</a><br><br><h3><b><a href=\"https://github.com/pi-hosted/pi-hosted/blob/master/tools/install_clamav.sh\" target=\"_blank\">Pre-installation script</a> must be RAN before you install: </b>wget -qO- https://raw.githubusercontent.com/pi-hosted/pi-hosted/master/tools/install_clamav.sh | bash</h3><br><br>"
+		},
 		{
 			"categories": [
 				"DNS",

+ 19 - 0
tools/install_clamav.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+
+function error {
+  echo -e "\\e[91m$1\\e[39m"
+  exit 1
+}
+
+echo "Creating directories..."
+sudo mkdir -p /portainer/Files/AppData/Config/clamav/config || error "Failed to create clamav config folder!"
+sudo mkdir -p /portainer/Files/AppData/Config/clamav/virus_definitions || error "Failed to create clamav virus_definitions folder!"
+
+echo "Creating pre-filled clamav config files"
+sudo wget -O /portainer/Files/AppData/Config/clamav/config/clamd.conf https://github.com/Cisco-Talos/clamav/files/10096744/clamd.conf.txt || error "Failed to get clamd config file!"
+sudo wget -O /portainer/Files/AppData/Config/clamav/config/freshclam.conf https://github.com/Cisco-Talos/clamav/files/10096745/freshclam.conf.txt || error "Failed to get freshclam config file"
+
+echo "Setting the right permissions"
+sudo chown -R 100:101 /portainer/Files/AppData/Config/clamav/ || error "Unable to set the right permissions for clamav!"
+
+echo "Setup complete. You can now install clamav using the App Template."