Docker shadowsocks multi-user ss-panel console, dockershadowsocks

Source: Internet
Author: User

Docker shadowsocks multi-user ss-panel console, dockershadowsocks

In order to facilitate the deployment of your own shadowsocks and ss-panel, it took two days to learn and compile dockerfile and make a docker version. You are welcome to download and use it.

 

Docker version address

Https://hub.docker.com/r/maxidea/ss-panel/

This Docker image is based on the official ubuntu version and contains the required installation packages and environments such as nginx, php, mysql, redis, and shadowsocks.

Docker version installation system requirements

1) Docker requires a 64-bit system with a kernel version of at least 3.10 (for Ubuntu 12.04 LTS, the kernel version must be at least 3.13)

2) The remaining disk space is more than 2 GB.

Installation Process 1) install docker
wget -qO- https://get.docker.com/ | sh
2) download the image
docker pull maxidea/ss-panel
3) first-time image running
docker run -d -P maxidea/ss-paneldocker ps

Check whether the container is started normally. For example:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES90d665f94787 maxidea/ss-panel "/usr/bin/supervisord" 13 seconds ago Up 12 seconds 0.0.0.0:32777->80/tcp, 0.0.0.0:32776->1025/tcp, 0.0.0.0:32775->1026/tcp, 0.0.0.0:32774->1027/tcp, 0.0.0.0:32773->1028/tcp nostalgic_stonebraker

Enter the CONTAINER. The container id is 90d665f94787.

docker exec -i -t <CONTAINER ID> /bin/bash

Create an ss-panel Administrator Account

root@[CONTAINER ID]:/ cd /opt/ss-panel; php xcat createAdmin

Normal output:

Add admin/create Administrator account... Enter your email/Enter administrator Email: 123@qq.comEnter password for: 123@qq.com/add Password for 123@qq.com 123 email: 123@qq.com, password: 123! Press [Y] to create admin... Press [Y] to confirm the creation of the Administrator account... Y

Restart the shadowsocks service:

Root @ [container id]:/supervisorctl restart shadowsocksroot @ [container id]:/service nginx restartroot @ [container id]:/exit # exit the CONTAINER
4) Save the changes to the image
docker commit <container_id> maxidea/ss-panel
5) Start the image again, run it in the background, and specify the port for external use.

(The user port 1025 is used by the newly created admin account, and the corresponding password is visible to the ss-panel)
(Ports later than 1026 are used by new users. Add a port ing each time a new user is created. For example :)

docker run -d -p 80:80 -p 1025:1025 -p 1026:1026 -p 1027:1027 maxidea/ss-panel
Manage ss-panel

1) User Management
Log on to the background using the admin account: http: // youripaddress: port/admin

2) Monitor the shadowsocks Process

Host:

docker exec <CONTAINER ID> supervisorctl tail -f shadowsocks stderr

Or in the container:

supervisorctl tail -f shadowsocks stderr
Dockerfile code:

Because learning docker only two days, understanding of dockerfile is still relatively superficial, I hope you give more comments, Project address: https://hub.docker.com/r/maxidea/ss-panel /~ /Dockerfile/

Dockerfile code:

 1 # ss-panel 2 # 3 # VERSION 3.0 4  5 # auto build from my github project: https://github.com/maxidea-com/ss-panel 6  7 FROM ubuntu:14.04  8  9 # make sure the package repository is up to date10 RUN apt-get -y update && apt-get install -y redis-server11 RUN echo "mysql-server-5.6 mysql-server/root_password password pw123456" | sudo debconf-set-selections12 RUN echo "mysql-server-5.6 mysql-server/root_password_again password pw123456" | sudo debconf-set-selections13 RUN apt-get -y install mysql-server-5.614 RUN apt-get -y install git curl php5 php-guzzle php5-mysql nginx php5-fpm15 RUN apt-get install -y python-pip python-m2crypto16 RUN pip install cymysql17 RUN cd /opt; git clone -b manyuser https://github.com/mengskysama/shadowsocks.git18 RUN rm -f /opt/shadowsocks/shadowsocks/Config.py19 RUN rm -f /opt/shadowsocks/shadowsocks/config.json20 RUN apt-get -y install supervisor21 RUN cd /opt; git clone https://github.com/maxidea-com/ss-panel.git22 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/bin --filename=composer23 RUN cd /opt/ss-panel/; composer install24 RUN chmod -R 777 /opt/ss-panel/storage25 RUN rm -f /etc/nginx/sites-available/default26 27 ADD Config.py /opt/shadowsocks/shadowsocks/Config.py28 ADD config.json /opt/shadowsocks/shadowsocks/config.json29 ADD shadowsocks.conf /etc/supervisor/conf.d/shadowsocks.conf30 ADD supervisor.conf /etc/supervisor/conf.d/supervisor.conf31 ADD 3line.sh /opt/3line.sh32 ADD mysql-init.sh /opt/mysql-init.sh33 ADD .env /opt/ss-panel/.env34 ADD default /etc/nginx/sites-available/default35 36 RUN /bin/bash /opt/3line.sh37 RUN service mysql start38 RUN /bin/bash /opt/mysql-init.sh39 40 RUN apt-get clean && apt-get autoclean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*41 42 EXPOSE 80 1025 1026 1027 102843 44 45 CMD ["/usr/bin/supervisord"] 46 47 48 # contact49 MAINTAINER SimonXu, maxidea@gmail.com

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.