- 浏览: 2543146 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Raspberry and JavaFTP on Docker
Enable the JavaFTP server on docker.
Here is the Makefile
IMAGE=sillycat/public
TAG=raspberrypi-javaftp
NAME=raspberrypi-javaftp
prepare:
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-arm32-vfp-hflt.tar.gz" -P install/
wget http://apache.mirrors.lucidnetworks.net/mina/ftpserver/1.0.6/dist/ftpserver-1.0.6.tar.gz -P install/
#tar zxvf ftpserver-1.0.6.tar.gz
#tar -cvzf ./apache-ftpserver-1.0.6.tgz ./apache-ftpserver-1.0.6
docker-context:
build: docker-context
# docker build --no-cache -t $(IMAGE):$(TAG) .
docker build -t $(IMAGE):$(TAG) .
run:
docker run -d -p 2121:2121 -p 30000-30039:30000-30039 -v /opt/disk1/sillycat:/tool/apache-ftpserver-1.0.6/res/home/sillycat --name $(NAME) $(IMAGE):$(TAG)
debug:
docker run -ti -p 2121:2121 -p 30000-30039:30000-30039 -v /opt/disk1/sillycat:/tool/apache-ftpserver-1.0.6/res/home/sillycat --name $(NAME) $(IMAGE):$(TAG) /bin/bash
clean:
docker stop ${NAME}
docker rm ${NAME}
logs:
docker logs ${NAME}
publish:
docker push ${IMAGE}:${TAG}
fetch:
docker pull ${IMAGE}:${TAG}
Here is the Dockerfile
#Set up FTP in Docker
#Prepre the OS
FROM resin/rpi-raspbian:jessie
MAINTAINER Carl Luo <luohuazju@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
RUN echo "deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi\n\
deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi\n\
" > /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -y dist-upgrade
#install java env
ADD install/jdk-8u91-linux-arm32-vfp-hflt.tar.gz /tool/
RUN update-alternatives --install /usr/bin/java java /tool/jdk1.8.0_91/bin/java 1
#install ftp soft
ADD install/apache-ftpserver-1.0.6.tgz /tool/
#configure the server
ADD conf/ftpd-typical.xml /tool/apache-ftpserver-1.0.6/res/conf/
ADD conf/users.properties /tool/apache-ftpserver-1.0.6/res/conf/
RUN mkdir -p /tool/apache-ftpserver-1.0.6/res/home/sillycat
RUN mkdir -p /tool/apache-ftpserver-1.0.6/res/home/kiko
RUN mkdir -p /tool/apache-ftpserver-1.0.6/res/home/xieqiuyuan
#start the application
EXPOSE 2121 30000-30040
RUN mkdir -p /app/
ADD start.sh /app/
WORKDIR /app/
CMD [ "./start.sh" ]
Here is the start.sh
#!/bin/sh -ex
#start the ftp
cd /tool/apache-ftpserver-1.0.6
bin/ftpd.sh res/conf/ftpd-typical.xml
The typical configuration for ftp in ftp-typical.xml is as follow:
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://mina.apache.org/ftpserver/spring/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd
"
id="nasServer"
max-logins="20"
anon-enabled="false"
max-login-failures="3"
login-failure-delay="500">
<listeners>
<nio-listener name="default" port="2121">
<ssl>
<keystore file="./res/ftpserver.jks" password="password" />
</ssl>
<data-connection idle-timeout="60">
<active enabled="true" local-port="30040" ip-check="true" />
<passive ports="30000-30039" external-address="72.179.1.15" />
</data-connection>
</nio-listener>
</listeners>
<file-user-manager file="./res/conf/users.properties" encrypt-passwords="false"/>
</server>
It works great. The only thing is that when I try to clean the old directory. I delete some directories which are useful. My god.
References:
http://sillycat.iteye.com/blog/2255064
https://mina.apache.org/ftpserver-project/configuration_passive_ports.html
https://mina.apache.org/ftpserver-project/configuration_listeners.html
Enable the JavaFTP server on docker.
Here is the Makefile
IMAGE=sillycat/public
TAG=raspberrypi-javaftp
NAME=raspberrypi-javaftp
prepare:
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-arm32-vfp-hflt.tar.gz" -P install/
wget http://apache.mirrors.lucidnetworks.net/mina/ftpserver/1.0.6/dist/ftpserver-1.0.6.tar.gz -P install/
#tar zxvf ftpserver-1.0.6.tar.gz
#tar -cvzf ./apache-ftpserver-1.0.6.tgz ./apache-ftpserver-1.0.6
docker-context:
build: docker-context
# docker build --no-cache -t $(IMAGE):$(TAG) .
docker build -t $(IMAGE):$(TAG) .
run:
docker run -d -p 2121:2121 -p 30000-30039:30000-30039 -v /opt/disk1/sillycat:/tool/apache-ftpserver-1.0.6/res/home/sillycat --name $(NAME) $(IMAGE):$(TAG)
debug:
docker run -ti -p 2121:2121 -p 30000-30039:30000-30039 -v /opt/disk1/sillycat:/tool/apache-ftpserver-1.0.6/res/home/sillycat --name $(NAME) $(IMAGE):$(TAG) /bin/bash
clean:
docker stop ${NAME}
docker rm ${NAME}
logs:
docker logs ${NAME}
publish:
docker push ${IMAGE}:${TAG}
fetch:
docker pull ${IMAGE}:${TAG}
Here is the Dockerfile
#Set up FTP in Docker
#Prepre the OS
FROM resin/rpi-raspbian:jessie
MAINTAINER Carl Luo <luohuazju@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
RUN echo "deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi\n\
deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi\n\
" > /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -y dist-upgrade
#install java env
ADD install/jdk-8u91-linux-arm32-vfp-hflt.tar.gz /tool/
RUN update-alternatives --install /usr/bin/java java /tool/jdk1.8.0_91/bin/java 1
#install ftp soft
ADD install/apache-ftpserver-1.0.6.tgz /tool/
#configure the server
ADD conf/ftpd-typical.xml /tool/apache-ftpserver-1.0.6/res/conf/
ADD conf/users.properties /tool/apache-ftpserver-1.0.6/res/conf/
RUN mkdir -p /tool/apache-ftpserver-1.0.6/res/home/sillycat
RUN mkdir -p /tool/apache-ftpserver-1.0.6/res/home/kiko
RUN mkdir -p /tool/apache-ftpserver-1.0.6/res/home/xieqiuyuan
#start the application
EXPOSE 2121 30000-30040
RUN mkdir -p /app/
ADD start.sh /app/
WORKDIR /app/
CMD [ "./start.sh" ]
Here is the start.sh
#!/bin/sh -ex
#start the ftp
cd /tool/apache-ftpserver-1.0.6
bin/ftpd.sh res/conf/ftpd-typical.xml
The typical configuration for ftp in ftp-typical.xml is as follow:
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://mina.apache.org/ftpserver/spring/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd
"
id="nasServer"
max-logins="20"
anon-enabled="false"
max-login-failures="3"
login-failure-delay="500">
<listeners>
<nio-listener name="default" port="2121">
<ssl>
<keystore file="./res/ftpserver.jks" password="password" />
</ssl>
<data-connection idle-timeout="60">
<active enabled="true" local-port="30040" ip-check="true" />
<passive ports="30000-30039" external-address="72.179.1.15" />
</data-connection>
</nio-listener>
</listeners>
<file-user-manager file="./res/conf/users.properties" encrypt-passwords="false"/>
</server>
It works great. The only thing is that when I try to clean the old directory. I delete some directories which are useful. My god.
References:
http://sillycat.iteye.com/blog/2255064
https://mina.apache.org/ftpserver-project/configuration_passive_ports.html
https://mina.apache.org/ftpserver-project/configuration_listeners.html
发表评论
-
Update Site will come soon
2021-06-02 04:10 1672I am still keep notes my tech n ... -
Stop Update Here
2020-04-28 09:00 310I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 468NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 362Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 364Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 330Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 424Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 429Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 367Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 445VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 377Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 468NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 414Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 332Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 243GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 445GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 321GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 307Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 310Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 286Serverless with NodeJS and Tenc ...
相关推荐
rust-on-raspberry-docker:在docker容器中交叉编译树莓派的rust
rpi-hubot-docker-template Raspberry Pi上的Hubot Docker容器模板如何在Raspberry Pi上使用Docker 上安装。 请参阅以设置环境。用法克隆此仓库 $ git clone https://github.com/knjcode/rpi-hubot-docker-template$...
利用Docker和Raspberry Pi进行物理计算
Ansible角色:Raspberry-Docker 在Raspberry Pi OS上管理的Ansible角色。 安装 $ ansible-galaxy install escalate.raspberry_docker 角色变量 请参阅以获取可以覆盖的变量的完整列表。 依存关系 该角色依赖于以下...
raspberrypi-rstudio:用于Raspberry Pi的RStudio-Docker构建和运行时环境
docker-arm_20.10.6 资源
rpi-ubuntu:如何在Raspberry Pi 34上使用Docker运行Ubuntu
标题“Windows on Raspberry.zip”揭示了这个压缩包与在树莓派上运行Windows操作系统有关,具体来说是Windows 10。树莓派是一款基于Linux的微型计算机,通常用于教育、DIY项目和嵌入式系统开发。然而,通过特定的...
Beginning Robotics with Raspberry Pi and Arduino_Using Python and OpenCV-Apress(2018) Robotics does not have to be difficult. In this book, I introduce you to the field of robotics. The journey will ...
该存储库包含精选的有用Docker容器堆栈,这些容器针对Raspberry Pi进行了优化-主要用于媒体/娱乐。 许多容器在首次使用时都需要进行其他配置,但是在配置完所有内容后,只要保留config目录的备份,就可以轻松迁移到...
C Clearly Programming C in Linux and on Raspberry Pi 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
rpi-docker-builder 该构建器在或更高版本的本地运行,或在具有Docker 1.5 Image的上本地运行。 如何使用 TL; DR git clone https://github.com/hypriot/rpi-docker-builder.git cd rpi-docker-builder ./build.sh...
Compilation - Compiling and Running C Programs, Installing Codeblocks IDE on Raspberry Pi / Linux, Variables and Data Types in C, Operators, Input and output - printf and scanf, Strings, Arrays, ...
Raspberry Docker包一些使用docker-compose的docker软件包可以轻松地向Raspberry Pi添加新服务。 在Raspberry Pi 4(4GB)上测试。要求在开始之前,您需要在Raspberry Pi上安装了docker的64位操作系统。 如果没有,...
IOTStack IOTstack是docker-compose的构建器,可轻松在Raspberry Pi公告上制作和维护IoT堆栈。自述文件的大部分已移至Wiki。 请在此处查看2019-12-19新增的py IOTStack IOTstack是docker-compose的构建器,可轻松在...
标题中的“Python-Hypriot团队致力于让Docker能够在RaspberryPi上运行”揭示了一个关键的信息:Hypriot团队使用Python技术来实现Docker在Raspberry Pi这种基于ARM架构的微型计算机上的兼容性和优化。这个项目的目标...