Docker NAT容器自助部署php版本,实现从搭建到跑路的全生命周期功能。

Last update: Mar 4, 2022

DockerLabs-V1

游客可通过web页面直接创建出NAT容器,本项目从发布后将不再维护任何bug,以后有时间会出sdk重构版。

dockerlabs

环境要求

使用了赛邮云发送短信号码,需要自己去申请appid和appkey填写到app_config.php文件中。需要修改所有html文件和api/kill.php中的接口调用地址

  • php7
  • nginx
  • docker
  • 数据库说明

    创建docker数据库然后执行docker.sql文件导入表结构与demo数据

  • code表为使用码表
  • host表为容器表
  • node表为节点表
  • runing表为正在运行的容器表
  • 节点初始化配置

  • 1.安装docker
  • 2.开启API
  • $ systemctl show --property=FragmentPath docker </br>
    $ vi /lib/systemd/system/docker.service  </br>
    ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:1117  </br>
    $ systemctl daemon-reload  && systemctl restart docker
  • 3.拉取基础镜像(或者自己在本地build镜像)
  • 请参考https://github.com/xizim/docker-ttyd

    API结构说明

  • api/config.php --- 数据库配置
  • api/create.php --- 容器创建接口
  • api/docker.php --- 容器操作接口,包含创建、启动、停止、删除功能
  • api/GetCount.php --- 获取已创建过的容器数量
  • api/Getport.php --- 获取容器的SSH端口、外部放行端口
  • api/Getstatus.php --- 获取容器信息,版本、宿主机IP、内部端口、外部端口、CPU、内存、使用时长、容器状态
  • api/kill.php --- 删除容器接口
  • api/time.php --- 定时任务,删除已过使用时长的容器、删除已过期的验证码
  • api/GetNodeStatus.php ---获取节点状态
  • docker.sql --- 数据库结构
  • GitHub

    https://github.com/xizim/DockerLabs-V1
    You might also like...

    Shopware 6 app boilerplate + Symfony backend + Dockware docker dev environment 💙

    Shopware 6 app boilerplate with Symfony backend This boilerplate template can be used to get up and running with a docker-based dev setup for Shopware

    Nov 14, 2021

    Docker with PHP 7.4 fpm, Nginx, Composer, PhpUnit and MaridaDB

    Clean Docker with PHP Docker with PHP 7.4 fpm, Nginx, Composer, PhpUnit and MariaDB Starting app docker-compose up -d Main page

    Apr 26, 2022

    Ponto de partida para utilização do Docker Compose 💙✨

    Ponto de partida para utilização do Docker Compose 💙✨

    Docker-compose Docker | WSL2 | PHP | Nginx | MySQL Esse projeto fornece um ponto de partida para integrar diferentes serviços usando um arquivo Compos

    Nov 9, 2021

    A package that allows you to generate simple and fast Docker configurations for your Laravel application!

    A package that allows you to generate simple and fast Docker configurations for your Laravel application!

    Dec 23, 2021

    Docker-based workflow management system for Laravel

    DevOption Workflows Workflows is a Docker-based workflow management system for Laravel applications. Installation You can install the package via comp

    Jan 5, 2022

    Runs a PHP-based startpage in Docker

    Runs a PHP-based startpage in Docker

    docker-php-startpage Runs a PHP-based startpage in Docker Source code: GitHub Docker container: Docker Hub Image base: PHP Init system: N/A Applicatio

    May 15, 2022

    Lamp Docker skeleton PHP + Nginx + Mysql + Redis

    Stop installing the entire development stack on your local machine. This project will allow you to quickly start working with php. To install, you need to install docker locally.

    May 2, 2022

    Demo of how you can run your Laravel app with Docker Compose. Look at docker-compose.yml and the docker folder. The rest is just a clean Laravel + Horizon install.

    About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

    Oct 22, 2021

    Quickly deploy a seedbox with self-hosted services and a web portal using Docker and docker-compose.

    Quickly deploy a seedbox with self-hosted services and a web portal using Docker and docker-compose.

    Seedbox Quickly deploy and configure a seedbox with self-hosted services and a web portal using Docker and a single docker-compose.yml file. Screensho

    Apr 8, 2022

    A complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.

    A complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.

    🐳 Docker + PHP 7.4 + MySQL8.0 + Nginx + Certbot(HTTPS) + Symfony 5 Boilerplate 🐳 Edited from https://github.com/ger86/symfony-docker version - http

    Dec 3, 2021

    Docker-magento2 - 🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI

    Magento 2 Docker A collection of Docker images for running Magento 2 through nginx and on the command line. Quick Start cp composer.env.sample compose

    May 28, 2022

    Docker-magento - Docker image for Magento 1.6 to 1.9

    Docker image for Magento 1.x This repo creates a Docker image for Magento 1.x. Please note The primary goal of this repo is to create Docker images fo

    Dec 17, 2021

    🐋 This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

    🐋 This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

    Jan 26, 2022

    Docker Shortie, simplifying calls to CLI commands inside docker containers.

    What is DockTie Is a simple wrapper script for commands inside docker container(s). So for instance, what you would normally run as: docker-compo

    Mar 31, 2022

    Full PHP development environment for Docker.

    Full PHP development environment for Docker.

    Full PHP development environment based on Docker. Use Docker First - Learn About It Later! Join Us Awesome People Laradock is an MIT-licensed open sou

    May 23, 2022

    A modern Docker LAMP stack and MEAN stack for local development

    A modern Docker LAMP stack and MEAN stack for local development

    The Devilbox Usage | Architecture | Community | Features | Intranet | Screenshots | Contributing | Logos | License Support for valid https out of the

    May 26, 2022

    Up and running with small Docker environments

    Up and running with small Docker environments

    Vessel Up and running with small Docker dev environments. Documentation Full documentation can be found at https://vessel.shippingdocker.com. Install

    May 20, 2022

    An example of Laravel app that runs in a docker container with RoadRunner

    An example of Laravel app that runs in a docker container with RoadRunner

    This repository contains an example of Laravel (PHP Framework) application that runs in a docker container with RoadRunner (high-performance PHP appli

    May 6, 2022

    Symfony5 template w/ Docker config

    Symfony5 w/ Docker config A project template in the following configuration: Symfony 5.2 PHP8 PostgreSQL 13.2 Separate Docker containers for Nginx, FP

    May 14, 2022
    Quickly deploy a seedbox with self-hosted services and a web portal using Docker and docker-compose.
    Quickly deploy a seedbox with self-hosted services and a web portal using Docker and docker-compose.

    Seedbox Quickly deploy and configure a seedbox with self-hosted services and a web portal using Docker and a single docker-compose.yml file. Screensho

    Apr 8, 2022
    Docker Shortie, simplifying calls to CLI commands inside docker containers.

    What is DockTie Is a simple wrapper script for commands inside docker container(s). So for instance, what you would normally run as: docker-compo

    Mar 31, 2022
    Full PHP development environment for Docker.
    Full PHP development environment for Docker.

    Full PHP development environment based on Docker. Use Docker First - Learn About It Later! Join Us Awesome People Laradock is an MIT-licensed open sou

    May 23, 2022
    A modern Docker LAMP stack and MEAN stack for local development
    A modern Docker LAMP stack and MEAN stack for local development

    The Devilbox Usage | Architecture | Community | Features | Intranet | Screenshots | Contributing | Logos | License Support for valid https out of the

    May 26, 2022
    Up and running with small Docker environments
    Up and running with small Docker environments

    Vessel Up and running with small Docker dev environments. Documentation Full documentation can be found at https://vessel.shippingdocker.com. Install

    May 20, 2022
    Symfony5 template w/ Docker config

    Symfony5 w/ Docker config A project template in the following configuration: Symfony 5.2 PHP8 PostgreSQL 13.2 Separate Docker containers for Nginx, FP

    May 14, 2022
    The project provides a docker image for Files App(files.photo.gallery).
    The project provides a docker image for Files App(files.photo.gallery).

    For the purpose of learning,I replace the files.js with cracked version which just remove authorization code.

    Apr 13, 2022
    Multipurpose VIP Docker container images

    VIP Container Images This repository is used to build Docker container images used, among others, by the VIP Local Development Environment. Images are

    Mar 7, 2022
    Laravel 5 with Dockerized Gulp, PHP-FPM, MySQL and nginx using docker-compose

    docker-laravel Laravel 5 with Dockerized PHP-FPM, MySQL and nginx using docker-compose Usage Get Composer docker-compose run --rm phpnginx curl -O htt

    Feb 8, 2022
    Docker Containers for simple Laravel development.
    Docker Containers for simple Laravel development.

    Docker containers of Laravel development. Docker Containers for simple Laravel development. Prerequisites This package only works for Linux users righ

    May 19, 2022