Baota-docker - Deploying baota panel via docker

Overview

baota-docker

Deploying baota panel via docker. 通过docker一键部署宝塔面板。

一、前言

好像很多人对这个感兴趣,但是实现得不多,能找到的资料也不多。

首先感谢前辈的分享,https://github.com/pch18-docker/baota,受此启发,鉴于原作者长时间未更新,且部分功能未完善,于是在此分享下本人改进过的docker一键部署宝塔面板的经验。能力有限,对github、Linux、docker等并不是特比的熟悉,基本上就是靠着文档+谷歌+实践慢慢学了些皮毛,所以本源码的不周全之处还请见谅,也希望各位前辈们多多指教。

初衷是每次部署宝塔面板的安装过程都非常繁琐和漫长,考虑到docker的便捷性,如果能将宝塔面板的成品环境打包成docker镜像,每次部署只需要一键拉取和部署即可,方便快捷,简单省事,无需等待每次部署环境的漫长过程。同时镜像环境可以自定义包括nginx、Apache、php、mysql、redis、memcached等软件。

另一方面,docker打包的宝塔环境镜像,可以仅作为反代使用,网站文件从外部挂载,或者反代远程or本地其他端口程序,或反代其他容器,与其他程序docker镜像相互搭配使用,进一步提高安全性和便捷性。

查过一些资料,本仓库源码主要受上述原始仓库的启发,进一步优化和改进,感谢前辈们的无私分享,也希望大家踊跃探讨,继续完善。

二、镜像特点

  • 全程自动安装依赖
  • 自动安装宝塔面板、环境、插件
  • 自动修改默认面板端口、用户名、密码、安全入口
  • 自动配置镜像ssh
  • 自动同意首次登陆的用户协议
  • 自动取消强制登录
  • 自动降级为7.7.0版本

三、特别提醒

本仓库采用github action自动构建镜像并推送至docker hub,源码公开透明,所以请放心使用。但由于镜像内涉及到面板的用户名密码等敏感信息,建议各位自行修改与构建。

四、如何部署

  • 面板默认登录地址:http://{{面板ip地址}}:10808/xeu7TwHvtcfuj
  • 面板默认用户名:nzzaidi
  • 面板默认密码:dockerbaota
  • 面板默认端口:10808
  • 面板默认安全入口:/xeu7TwHvtcfuj
  • 镜像内部ssh端口:1072
  • 镜像内部ssh root用户密码:dockerbaota

注意:部署后务必先修改如上信息!!!或者修改代码后自行构建使用!!!以防止被利用!!!

镜像仓库地址:https://hub.docker.com/r/nzzaidi/baota-docker

代码仓库地址:https://github.com/nzzaidi/baota-docker

1.通过 docker run 运行

docker run -itd \
  --name baota \
  --network=host \
  --privileged=true \
  --restart=unless-stopped \
  -v ~/www/wwwroot:/www/wwwroot \
  -v ~/www/vhost:/www/server/panel/vhost \
  nzzaidi/baota-docker:lnp

2. 通过 docker-compose 运行

git clone https://github.com/nzzaidi/baota-docker.git
cd baota-docker
docker pull nzzaidi/baota-docker:lnp
COMPOSE_HTTP_TIMEOUT=1200 docker-compose --verbose up -d

常用命令:

# 获取宝塔面板默认信息
docker exec -it baota /etc/init.d/bt default

# 重启nginx
docker exec -it baota /etc/init.d/nginx restart

# 重启PHP
docker exec -it baota /etc/init.d/php-fpm-80 restart

# 重启mysql
docker exec -it baota /etc/init.d/mysqld restart

# 进入宝塔容器
docker exec -it baota /bin/sh

五、版本区别

已安装软件 clear ln lnp lnmp
nginx - √-1.21 √-1.21 √-1.21
php - - √-8.0 √-8.0
mysql - - - √-mariadb_10.2
phpmyadmin - - - √-5.1
redis - -
memcached - -
fileinfo - -
pm2 - -
phpguard(PHP守护) - -
ip_configuration(IP配置工具)
score(宝塔跑分)
webssh(宝塔SSH终端)
firewall(系统防火墙)
boot(系统启动项)
linuxsys(Linux工具箱)
supervisor(Supervisor管理器)
webshell_check(webshell查杀工具)
clear(日志清理工具)
webhook(宝塔WebHook)
msonedrive(微软OneDrive)
psync_api(宝塔一键迁移API版本)
gdrive(谷歌云网盘)
qiniu(七牛云存储)
txcos(腾讯云COS)
backup(宝塔配置备份)

(√ 表示已安装,- 表示未安装)

建议使用ln / lnp 版本镜像,数据库外置,比如搭配adminer+mariadb+postgres的docker镜像,将宝塔面板容器和数据库容器连接使用,以防止意外发生导致数据库丢失或泄露。

Owner
Mr. Cat
Mr. Cat
Desafio de projeto sobre Git/Github

Maçã ou Laranja? 🤔 Desafio Projeto Dio para Git/Github 🔶 Para esse primeiro repositório, decidir adicionar o primeiro algoritmo de inteligência arti

José Filipe 2 Oct 23, 2022
Trabalho N1 para a materia Tecnicas de Progamação da Anhembi Morumbi

Projeto da Anhembi Morumbi - Tecnicas de Programação. RPG de Console (CMD) Trabalho proposto pelo professor André Santana, na materia Tecnicas de Prog

Leonardo Silva M de Barros 3 Sep 12, 2021
GBSLocalLauncher - A script to compose ENV file for Local Compose

GBSLocalLauncher This is a script to compose ENV file for Local Compose. It crea

2 Jan 27, 2022
IBD Style Relative Strength Percentile Ranking of Stocks (i.e. 0-100 Score).

relative-strength IBD Style Relative Strength Percentile Ranking of Stocks (i.e. 0-100 Score). I also made a TradingView indicator, but it cannot give

57 Jan 06, 2023
Housing Price Prediction Using Machine Learning.

HOUSING PRICE PREDICTION USING MACHINE LEARNING DESCRIPTION Housing Price Prediction Using Machine Learning is to predict the data of housings. Here I

Shreya Shree Padhi 1 Aug 03, 2022
Framework to collect and process weather data from wttr.in.

Weathercrawler Automatic extraction and processing framework for weather data from wttr.in Installation tested with: Python 3.7.3 Python 3.9.4 git clo

Maurice Günder 0 Jul 26, 2021
Python script to extract all Humble Bundle keys and redeem them on Steam automagically.

humble-steam-key-redeemer Python script to extract all Humble keys and redeem them on Steam automagically. This is primarily designed to be a set-it-a

74 Jan 08, 2023
This Bot Can Upload Video from Link Of Pdisk to Pdisk using its API. @PredatorHackerzZ

𝐏𝐝𝐢𝐬𝐤 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐁𝐨𝐭 Make short link by using 𝐏𝐝𝐢𝐬𝐤 API key Installation 𝐓𝐡𝐞 𝐄𝐚𝐬𝐲 𝐖𝐚𝐲 𝐑𝐞𝐪𝐮𝐢𝐫𝐞𝐝 𝐕𝐚𝐫𝐢𝐚𝐛𝐥𝐞

ρяє∂αтσя 25 Dec 02, 2022
Cool Discord bot for you

BountyBot Баунти – современный бот созданный с целью сделать ваш сервер лучше! В кратце В нем присутствует множество основных и интересных функций, та

Leestarb Original 1 Nov 22, 2021
A Telegram Bot to display Codeforces Contest Ranklist

CFRankListBot A bot that displays the top ranks for a Codeforces contest. Participants' Details All the details of a participant is in the utils/__ini

Code IIEST 5 Dec 25, 2021
A Wide AOI tool for discord.

drkdiscord - drk#1337 A Wide AOI tool for discord. Installation To Install you have to have python 3.x and pip installed on your system. If you have t

Darkest Surface 6 Dec 17, 2022
Telegram bot to scrape images from the reddit universe

Telegram bot to scrape images from the reddit universe

XD22 3 Sep 30, 2022
Total time of all YouTube videos in a playlist.

Youtube Playlist Total Times Total time of all YouTube videos in a playlist. How to Use Download chromedriver depending on your os and chrome version

Mohammad Dori 3 Jul 15, 2022
Python powered spreadsheets

Marmir is powerful and fun Marmir takes Python data structures and turns them into spreadsheets. It is xlwt and google spreadsheets on steroids. It al

Brian Ray 170 Dec 14, 2022
Simple Reddit bot that replies to comments containing a certain word.

reddit-replier-bot Small comment reply bot based on PRAW. This script will scan the comments of a subreddit as they come in and look for a trigger wor

Kefendy 0 Jun 04, 2022
An API wrapper for discord; maintained and improved from discord.py

Fusion.py Documentation What is Fusion.py you might ask; Fusion.py is a Discord.py fork that has most of the good features from most of the big Discor

Senarc Studios 5 Apr 19, 2022
A collective list of free APIs for use in software and web development.

Public APIs A collective list of free APIs for use in software and web development. A public API for this project can be found here! For information o

222.5k Jan 02, 2023
TeamDltvideo Bot you can add in your Telegram Group Thanks

TeamDltvideo TeamDltvideo Bot you can add in your Telegram Group Thanks Video Stream is a telegram bot project that's allow you to play video on teleg

TeamDlt 1 Nov 18, 2021
Simple integrate of API udemy.com with python

Pyudemy Simple integrate of API udemy.com with python Quick start $ pip install pyudemy or $ python setup.py install Authentication To make any calls

Hudson Brendon 30 Jan 02, 2023
IACR Events Scraper

IACR Events Scraper This scrapes https://iacr.org/events/ and exports it as a calendar file. I host a version of this for myself under https://arrrr.c

Karolin Varner 6 May 28, 2022