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
EC2 that automatically move files received through FTP to S3

ftp-ec2-s3-cf EC2 that automatically move files received through FTP to S3 Installation CloudFormation template Deploy now! Usage IP / domain name: ta

Javier Santana 1 Jun 19, 2021
Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX)

Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX) ⭐️ AUTO BUY TOKEN ON LAUNCH AFTER ADD LIQUIDITY ⭐️ ⭐️ Support Uniswap

Crypto Trader 7 Jan 31, 2022
An Amazon Product Scraper built using scapy module of python

Amazon Product Scraper This is an Amazon Product Scraper built using scapy module of python Features it scrape various things Product Title Product Im

Sudhanshu Jha 1 Dec 13, 2021
Instagram Brute force attack helps you to find password of an instagram account from your list of provided password.

Instagram Brute force attack Instagram Brute force attack helps you to find password of an instagram account from your list of provided password. Inst

Naman Raj Singh 1 Dec 27, 2021
Twitch Linux Typer

Twitch Linux Typer The most cursed Twitch chat bot Listens to twitch chat, and then types it handles hotkeys and button presses via the ^ char, eg ctr

Robin Universe 4 Jun 27, 2022
Osmnx-examples - Usage examples, demos, and tutorials for OSMnx.

OSMnx Examples OSMnx is a Python package to work with street networks and other spatial data from OpenStreetMap: retrieve, model, analyze, and visuali

Geoff Boeing 1.2k Jan 03, 2023
M3U Playlist for free TV channels

Free TV This is an M3U playlist for free TV channels around the World. Either free locally (over the air): Or free on the Internet: Plex TV Pluto TV P

Free TV 964 Jan 08, 2023
Official API documentation for Highrise

Highrise API The Highrise API is implemented as vanilla XML over HTTP using all four verbs (GET/POST/PUT/DELETE). Every resource, like Person, Deal, o

Basecamp 128 Dec 06, 2022
Deezer client for python

Deezer Python Client A friendly Python wrapper around the Deezer API. Installation The package is published on PyPI and can be installed by running: p

Bruno Alla 103 Dec 19, 2022
Twitter bot to know the number of dislikes of a YouTube video

YT_dislikes is a twitter bot that allows you to know the number of dislikes (and likes) of a YouTube video. Now it is not possible to see the number o

1 Jan 08, 2022
Python linting made easy. Also a casual yet honorific way to address individuals who have entered an organization prior to you.

pysen What is pysen? pysen aims to provide a unified platform to configure and run day-to-day development tools. We envision the following scenarios i

Preferred Networks, Inc. 452 Jan 05, 2023
Mixcloud API wrapper for Python and Async IO

aiomixcloud Mixcloud API wrapper for Python and Async IO aiomixcloud is a wrapper library for the HTTP API of Mixcloud. It supports asynchronous opera

Aristotelis Mikropoulos 26 Dec 31, 2022
This is a simple bot for running Python code through Discord

Python Code Runner Discord Bot This is a simple bot for running Python code through Discord. It was originally developed for the Beginner.Codes Discor

beginner.py 1 Feb 14, 2022
Online Marketplace API

Online Marketplace API Table of Contents Setup Instructions Documentation Setup instructions Make sure you have python installed Clone the repository

Kanat 3 Jul 13, 2022
C Y B Ξ R UserBot is a project that simplifies the use of Telegram. All rights reserved.

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

C Y B Ξ R 0 Sep 20, 2022
Async client API for the Telegram Group Calls

PyTgCalls This project allow to make Telegram group call with MTProto Api using Pyrogram and WebRTC, this is possible thanks to the power of NodeJS's

185 Jan 03, 2023
IMDbPY is a Python package useful to retrieve and manage the data of the IMDb movie database about movies, people, characters and companies

IMDbPY is a Python package for retrieving and managing the data of the IMDb movie database about movies, people and companies. Revamp notice Starting

Davide Alberani 1.1k Jan 02, 2023
Anti-league-discordbot - Harrasses imbeciles for playing league of legends

anti-league-discordbot harrasses imbeciles for playing league of legends Running

Chris Clem 2 Feb 12, 2022
提供火币网交易接口API最简封装,提供现货买入、卖出、huobi币安查询账户余额等接口,数字货币,虚拟货币,BTC量化交易框架,自动交易,轻量便携,不用安装,即开即用

火币网交易接口的最简封装(只管用,不用再关注细节) 提供火币网交易接口的python封装,提供买入、卖出、查询账户余额等接口 接口说明 order_value() 进行买入操作,参数为买入的币和买入的金额 买入返回的详情数据: {'单号': '272229546125038', '成交数量': 0.

dev 95 Sep 24, 2021
Pluggable Telethon - Telegram UserBot

A stable pluggable Telegram userbot, based on Telethon.

Team Ultroid 2.3k Dec 30, 2022