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
Discord Rich Presence implementation for Plex.

Perplex Perplex is a Discord Rich Presence implementation for Plex. Features Modern and beautiful Rich Presence for both movies and TV shows The Movie

Ethan 52 Dec 19, 2022
This is Instagram reposter that repost TikTok videos.

from-tiktok-to-instagram-reposter This script reposts videos from Tik Tok to your Instagram account. You must enter the username and password and slee

Mohammed 19 Dec 01, 2022
Minimal API for the COVID Booking System of the Offices at the UniPD Math Dep

Simple and easy to use python BOT for the COVID registration booking system of the math department @ unipd (torre archimede). This API creates an interface with the official website, with more useful

Guglielmo Camporese 4 Dec 24, 2021
discord.py bot written in Python.

bakerbot Bakerbot is a discord.py bot written in Python :) Originally made as a learning exercise, now used by friends as a somewhat useful bot and us

8 Dec 04, 2022
The public discord bot, created by: primitt, further developed by: duino-coin team.

Duino Stats Mini A public Duino-Stats Discord bot. Click this link to invite the bot to your server. License Duino Stats Mini distributed under the MI

primboi 8 Mar 14, 2022
Python API wrapper library for Convex Value API

convex-value-python Python API wrapper library for Convex Value API. Further Links: Convex Value homepage @ConvexValue on Twitter JB on Twitter Authen

Aaron DeVera 2 May 11, 2022
Kali Kush - Account Nuker Tool

Kali Kush - Account Nuker Tool This is a discord tool made by me, and SSL :) antho#1731 How to use? pip3 install -r requirements.txt -py kalikush.py -

ryan 3 Dec 21, 2021
Pretend to be a discord bot

Pretendabot © Pretend to be a discord bot! About Pretendabot© is an app that lets you become a discord bot!. It uses discord intrigrations(webhooks) a

Advik 3 Apr 24, 2022
fbchat - Facebook Messenger for Python

A powerful and efficient library to interact with Facebook's Messenger, using just your email and password.

1.1k Dec 23, 2022
Collect links to profiles by username through search engines

Marple Summary Collect links to profiles by username through search engines (currently Google and DuckDuckGo). Quick Start ./marple.py soxoj Results:

125 Dec 19, 2022
Webb-Tracker-Bot - This is a discord bot that displays current progress of the James Webb Space Telescope.

Webb-Tracker-Bot - This is a discord bot that displays current progress of the James Webb Space Telescope.

Copperbotte 1 Jan 05, 2022
C Y B Ξ R UserBot is a project that simplifies the use of Telegram.

C Y B Ξ R USΞRBOT 🇦🇿 C Y B Ξ R UserBot is a project that simplifies the use of Telegram. All rights reserved. Automatic Setup Android: open Termux p

FVREED 4 Dec 07, 2022
A discord token grabber made in Python 3

Discord Token Grabber A Discord token grabber written in Python 3. This version of the grabber only supports Windows. Features Transfers via Discord w

Mega145 4 Aug 04, 2022
A nuker for Roblox accounts.

Roblox-Nuker A nuker for Roblox accounts. Made by Ice Bear#0167 Usage I would recommend running in replit (https://replit.com) as it is deprecated in

7 May 10, 2022
Python library for the Stripe API.

Stripe Python Library The Stripe Python library provides convenient access to the Stripe API from applications written in the Python language. It incl

Stripe 1.3k Jan 03, 2023
Scratch2py or S2py is a easy to use, versatile tool to communicate with the Scratch API Based of Scratch2py

Scratch2py Scratch2py or S2py is a easy to use, versatile tool to communicate with the Scratch API Based of Scratch2py Installation Run this command i

2 Jan 13, 2022
ShadowClone allows you to distribute your long running tasks dynamically across thousands of serverless functions and gives you the results within seconds where it would have taken hours to complete

ShadowClone allows you to distribute your long running tasks dynamically across thousands of serverless functions and gives you the results within seconds where it would have taken hours to complete

240 Jan 06, 2023
Simple bot to receive feedback,same as livegram bot but with more features & full control over bot

Kontak Simple bot to receive feedback,same as livegram bot but with more features & full control over bot Deploy to VPS

Mahin Ahmed 2 Dec 16, 2021
Slack->DynamDB->Some applications

slack-event-subscriptions About The Project Do you want to get simple attendance checks? If you are using Slack, participants can just react on a spec

UpstageAI 26 May 28, 2022
Auto Join: A GitHub action script to automatically invite everyone to the organization who comment at the issue page.

Auto Invite To Org By Issue Comment A GitHub action script to automatically invite everyone to the organization who comment at the issue page. What is

Max Base 6 Jun 08, 2022