Nas-qnap through Docker for DDNS

Source: Internet
Author: User
Tags git clone docker ps docker run aliyun

NAS Network Memory-NAS (network memory)

Premise: There is a public network IP, but do not want to pay the recommended use

dockerhub:https://hub.docker.com/r/chenhw2/aliyun-ddns-cli/

Github:https://github.com/chenhw2/aliyun-ddns-cli

Suggested that you can delete the previous Alibaba cloud on the A-class WWW record value, otherwise you can appear two of the same record value

Then run the Docker instance on my test

Seemingly unstable, sometimes dump, just for entertainment lazy mode

(recommended) Download the built-in Docker tar package directly into it, Nas_ddns.tar

Search Dockerhub Pull Mirror Yangxuan0261/ddns_aliyun

Create an instance on QNAP

Build Yourself

Pull the Docker build file from Git

git clone git@github.com:yangxuan0261/nas_ddns.git

Build the image, replace the yangxuan0261 with your own Dockerhub account, only use the aliyun.sh, others can go on their own to toss

Docker build-t Yangxuan0261/ddns_aliyun.

You can then export a tar package, or push to Dockerhub

Create an instance on QNAP

(Qnap uses container station can be ignored) this is the Linux operating parameters, you can test on their own virtual host

Docker run-d \
--restart=always \
--name ddns_aliyun \
e-time= "*/5 * * * *" \
e apiid= "ASD" \
e Ap ikey= "SK60WASDASDASD" \-
e domain= "asdasd.com" \
Yangxuan0261/ddns_aliyun

The above timed time is the schedule. Every 5 minutes, the specific set of reference timing scheduling, other parameters for your own parameters, domain names do not www prefix

root@ubuntu:~/nas_ddns# Docker ps-a
CONTAINER ID        IMAGE                             COMMAND                   CREATED             STATUS              PORTS                     NAMES
9e1d107b63ad        yangxuan0261/ddns:aliyun          "/bin/sh-c ' \"/app ... "   Minutes ago up      minutes                                 Ddns_aliyun

Test, change the domain name record value to another IP, wait a minute, automatically modified after the mail notification. create an instance on Qnap

Add several environment variables to

Timing Scheduling

https://segmentfault.com/a/1190000002628040

1. Execute once per minute * * * * * 

2, every hour of the year * 
* * * * or
* */1 * * *  (/= Frequency)

3, each hour of the 15 and 30 each execution once 15,45 * * * * (, to indicate side-by-side 
)

4, in the morning of 8-11 hours in the middle of 15, 45 minutes each to execute
15,45 8-11 * * * Command (-indication range)

5, each Monday from 8 o'clock in the morning to 11 points 3rd and 15 minutes to execute
3,15 8-11 * * 1 command

6, every two days 8 o'clock in the morning to 11 points 3rd and 15 minutes execution
3,15 8-11 */2 * command
Referenceshttps://post.smzdm.com/p/646325/

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.