mirror of
https://gitee.com/kennylee/docker.git
synced 2024-12-01 19:38:30 +08:00
新增finalspeed-serv的docker化
This commit is contained in:
parent
28a130af5c
commit
7e404d5627
31
finalspeed-serv/Dockerfile
Executable file
31
finalspeed-serv/Dockerfile
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
# finalspeed-server
|
||||||
|
# NAME: kennylee26/fs-server
|
||||||
|
|
||||||
|
# Pull base image.
|
||||||
|
FROM kennylee26/java7
|
||||||
|
|
||||||
|
# Basic Requirements
|
||||||
|
RUN \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y unzip wget libpcap-dev iptables
|
||||||
|
|
||||||
|
RUN apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ENV FS_HOME="/fs"
|
||||||
|
ENV FS_SERVER_URL="http://fs.d1sm.net/finalspeed/finalspeed_server.zip"
|
||||||
|
ENV FS_SERVER_NAME="finalspeed_server.zip"
|
||||||
|
|
||||||
|
RUN mkdir -p $FS_HOME
|
||||||
|
WORKDIR $FS_HOME
|
||||||
|
|
||||||
|
RUN wget -O $FS_SERVER_NAME $FS_SERVER_URL
|
||||||
|
RUN unzip -o $FS_SERVER_NAME -d $FS_HOME
|
||||||
|
RUN chmod +x $FS_HOME/restart.sh
|
||||||
|
|
||||||
|
EXPOSE 150
|
||||||
|
|
||||||
|
ADD run.sh /run.sh
|
||||||
|
RUN chmod +x /*.sh
|
||||||
|
|
||||||
|
CMD ["/run.sh"]
|
6
finalspeed-serv/README.md
Executable file
6
finalspeed-serv/README.md
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
FinalSpeed服务端
|
||||||
|
---
|
||||||
|
|
||||||
|
由于FinalSpeed服务端的说明比较少,一般都是简短的安装和使用教程,所以有些细节的地方不知道放到docker环境下是否有影响。
|
||||||
|
|
||||||
|
除了目前官方说明的150监听端口外,发现客户端连接的时候还会监听48xxx的随机端口。所以为了方便,设置为net为host。
|
7
finalspeed-serv/docker-compose.yml
Normal file
7
finalspeed-serv/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
app:
|
||||||
|
build: .
|
||||||
|
container_name: fs_server
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai
|
||||||
|
restart: always
|
||||||
|
net: host #因为没说明server的监听说明,十分纠结,虽然怀疑会随机监听48000-50000的端口,但为了一劳永逸,暂时偷懒host
|
7
finalspeed-serv/run.sh
Normal file
7
finalspeed-serv/run.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
install_path=/fs/
|
||||||
|
|
||||||
|
sh ${install_path}"restart.sh"
|
||||||
|
sleep 1s
|
||||||
|
tail -f ${install_path}"server.log"
|
@ -21,6 +21,8 @@ RUN cnpm install gitbook-cli -g && \
|
|||||||
|
|
||||||
RUN gitbook versions:install $GIT_BOOK_VERSION
|
RUN gitbook versions:install $GIT_BOOK_VERSION
|
||||||
|
|
||||||
|
# install recommend plugins
|
||||||
|
|
||||||
RUN apt-get clean && \
|
RUN apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
@ -7,4 +7,8 @@
|
|||||||
1. ftp支持上传和下载功能。账号: ftp 密码 ftp
|
1. ftp支持上传和下载功能。账号: ftp 密码 ftp
|
||||||
2. samba仅支持下载。
|
2. samba仅支持下载。
|
||||||
|
|
||||||
注意 docker-compose.yml 文件中的一些本地路径映射的配置,根据实际情况来修改。
|
注意 docker-compose.yml 文件中的一些本地路径映射的配置,根据实际情况来修改。
|
||||||
|
|
||||||
|
--------
|
||||||
|
|
||||||
|
FTP配置信息,参见:http://download.pureftpd.org/pub/pure-ftpd/doc/README
|
@ -1,6 +1,6 @@
|
|||||||
ftp:
|
ftp:
|
||||||
image: kennylee26/pureftpd
|
image: kennylee26/pureftpd
|
||||||
container_name: "pureftpd"
|
container_name: "share-pureftpd"
|
||||||
net: "host" # none but net=host, windows user can be work.
|
net: "host" # none but net=host, windows user can be work.
|
||||||
# Please create these folders at before.
|
# Please create these folders at before.
|
||||||
volumes:
|
volumes:
|
||||||
@ -11,7 +11,7 @@ ftp:
|
|||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
samba:
|
samba:
|
||||||
image: vimagick/samba
|
image: vimagick/samba
|
||||||
container_name: "samba"
|
container_name: "share-samba"
|
||||||
ports:
|
ports:
|
||||||
- "137:137/udp"
|
- "137:137/udp"
|
||||||
- "138:138/udp"
|
- "138:138/udp"
|
||||||
@ -24,3 +24,13 @@ samba:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
|
http:
|
||||||
|
image: nginx:1.9.8
|
||||||
|
container_name: "share-http"
|
||||||
|
ports:
|
||||||
|
- "8001:80"
|
||||||
|
volumes:
|
||||||
|
- /home/data/ftp/files/ftp:/usr/share/nginx/html
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai
|
||||||
|
restart: always
|
||||||
|
Loading…
Reference in New Issue
Block a user