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镜像,将宝塔面板容器和数据库容器连接使用,以防止意外发生导致数据库丢失或泄露。

You might also like...
Docker image for epicseven gvg qq chatbot based on Xunbot
Docker image for epicseven gvg qq chatbot based on Xunbot

XUN_Langskip XUN 是一个基于 NoneBot 和 酷Q 的功能型QQ机器人,目前提供了音乐点播、音乐推荐、天气查询、RSSHub订阅、使用帮助、识图、识番、搜番、上车、磁力搜索、地震速报、计算、日语词典、翻译、自我检查,权限等级功能,由于是为了完成自己在群里的承诺,一时兴起才做的,所

This bot is made with Python and it is running using Docker container and is concentrated on heroku.

This bot is made with Python and it is running using Docker container and is concentrated on heroku.

Quickly visualize docker networks with graphviz.
Quickly visualize docker networks with graphviz.

Docker Network Graph Visualize the relationship between Docker networks and containers as a neat graphviz graph. Example Usage usage: docker-net-graph

A simple test repo created following docker docs.

docker_sampleRepo A simple test repo created following docker docs. Link to docs: https://docs.docker.com/language/python/develop/ Other links: https:

GitHub Actions Docker training

GitHub-Actions-Docker-training Training exercise repository for GitHub Actions using a docker base. This repository should be cloned and used for trai

Unofficial GoPro API Library for Python - connect to GoPro via WiFi.
Unofficial GoPro API Library for Python - connect to GoPro via WiFi.

GoPro API for Python Unofficial GoPro API Library for Python - connect to GoPro cameras via WiFi. Compatibility: HERO3 HERO3+ HERO4 (including HERO Se

SSH-Restricted deploys an SSH compliance rule (AWS Config) with auto-remediation via AWS Lambda if SSH access is public.
SSH-Restricted deploys an SSH compliance rule (AWS Config) with auto-remediation via AWS Lambda if SSH access is public.

SSH-Restricted SSH-Restricted deploys an SSH compliance rule with auto-remediation via AWS Lambda if SSH access is public. SSH-Auto-Restricted checks

Tracker to check the covid shot slot availability in India and send mobile alerts via Twilio Messaging Service.

Cowin-Slot-Tracker Tracker to check the covid vaccine slot availability in India and send mobile notifications through Twilio Messaging Service. Requi

This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. If you like this project please consider donating via brave. Thanks.

This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. The bot f

Owner
Mr. Cat
Mr. Cat
Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and also everything you could possibly need for raids

Discord Panel Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and al

null 11 Mar 30, 2022
Building and deploying AWS Lambda Shared Layers

AWS Lambda Shared Layers This repository is hosting the code from the following blog post: AWS Lambda & Shared layers for Python. The goal of this rep

Flaneer 7 Dec 2, 2021
GTK3-based panel for sway window manager

nwg-panel I have been using sway since 2019 and find it the most comfortable working environment, but... Have you ever missed all the graphical bells

Piotr Miller 290 Jan 7, 2023
Terminal-Trade(Panel API) For Binance

Binance-Trade-Project Binance Futures Terminal-Trade(API) & Binance This Project Worth Around 500 Bucks. **I Did This Project For SomeOne And He

Cyber 9 Dec 30, 2021
Administration Panel for Control FiveM Servers From Discord

FiveM Discord Administration Panel Version 1.0.0 If you would like to report an issue or request a feature. Join our Discord or create an issue. Contr

NIma 9 Jun 17, 2022
DDoS Script (DDoS Panel) with Multiple Bypass ( Cloudflare UAM,CAPTCHA,BFM,NOSEC / DDoS Guard / Google Shield / V Shield / Amazon / etc.. )

KARMA DDoS DDoS Script (DDoS Panel) with Multiple Bypass ( Cloudflare UAM,CAPTCHA,BFM,NOSEC / DDoS Guard / Google Shield / V Shield / Amazon / etc.. )

Hyuk 256 Jan 2, 2023
A Python library for the Docker Engine API

Docker SDK for Python A Python library for the Docker Engine API. It lets you do anything the docker command does, but from within Python apps – run c

Docker 6.1k Jan 3, 2023
可基于【腾讯云函数】/【GitHub Actions】/【Docker】的每日签到脚本(支持多账号使用)签到列表: |爱奇艺|全民K歌|腾讯视频|有道云笔记|网易云音乐|一加手机社区官方论坛|百度贴吧|Bilibili|V2EX|咔叽网单|什么值得买|AcFun|天翼云盘|WPS|吾爱破解|芒果TV|联通营业厅|Fa米家|小米运动|百度搜索资源平台|每日天气预报|每日一句|哔咔漫画|和彩云|智友邦|微博|CSDN|王者营地|

每日签到集合 基于【腾讯云函数】/【GitHub Actions】/【Docker】的每日签到脚本 支持多账号使用 特别声明: 本仓库发布的脚本及其中涉及的任何解锁和解密分析脚本,仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断。

null 87 Nov 12, 2022
Huggingface inference with GPU Docker on AWS

This repository contains code to containerize and deploy a GPU docker on AWS for summarization task. Find a detailed blogpost here Youtube Video Versi

Ramsri Goutham Golla 21 Dec 30, 2022