├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── acng └── Dockerfile ├── activemq └── Dockerfile ├── adb ├── Dockerfile ├── adbkey ├── adbkey.pub └── update-platform-tools.sh ├── alpine └── Dockerfile ├── asuswrt-merlin-build ├── Dockerfile ├── README.md ├── VERSION ├── build.sh ├── download_merlin.sh └── hooks │ └── build ├── caddy └── Dockerfile ├── cfssl-build ├── Dockerfile └── build.sh ├── chrome-headless ├── Dockerfile └── entrypoint.sh ├── confluence ├── Dockerfile ├── atlassian-agent.jar └── hijack.sh ├── demo ├── Dockerfile ├── docker.png └── index.html ├── docker-kubectl └── Dockerfile ├── elastalert └── Dockerfile ├── fpm └── Dockerfile ├── frp └── Dockerfile ├── gh-pages ├── Dockerfile └── Gemfile ├── html ├── Dockerfile └── landscape-animation-experiment │ ├── README.txt │ ├── css │ └── style.css │ ├── index.html │ ├── js │ └── index.js │ └── license.txt ├── jetbrains.jpeg ├── jira ├── Dockerfile ├── atlassian-agent.jar └── hijack.sh ├── mattermost ├── Dockerfile ├── README.md └── entrypoint.sh ├── metricbeat ├── Dockerfile └── docker-entrypoint.sh ├── owncloud ├── Dockerfile ├── docker-entrypoint.sh └── opcache-recommended.ini ├── privoxy └── Dockerfile ├── puppeteer-base └── Dockerfile ├── rssbot └── Dockerfile ├── shadowsocks ├── Dockerfile ├── README.md ├── entrypoint.sh └── runit │ ├── kcptun │ └── run │ └── shadowsocks │ └── run ├── simple-obfs └── Dockerfile ├── sniproxy ├── Dockerfile ├── entrypoint.sh └── sniproxy.conf ├── swagger-editor └── Dockerfile ├── teleport ├── Dockerfile └── teleport.yaml ├── time-machine ├── Dockerfile ├── README.md ├── conf │ ├── afp.conf │ └── afpd.service ├── entrypoint.sh └── services │ ├── avahi │ └── run │ └── netatalk │ └── run ├── tor ├── Dockerfile ├── README.md ├── entrypoint.sh └── torrc ├── twemproxy ├── Dockerfile ├── config.yml └── entrypoint.sh ├── upsource └── Dockerfile ├── v2ray ├── Dockerfile ├── README.md └── entrypoint.sh ├── videovip ├── Dockerfile └── vip │ └── index.html ├── yearning └── Dockerfile └── zeroclipboard ├── Dockerfile └── Gemfile /.gitignore: -------------------------------------------------------------------------------- 1 | gcr-registry/docker-entrypoint.sh 2 | gcr-registry/registry/*.json 3 | goflyway/goflyway 4 | mritd/vippasswd 5 | atlassian-confluence/atlassian-agent.jar 6 | atlassian-jira/atlassian-agent.jar 7 | rap2-dolores/config.prod.ts 8 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ytpay"] 2 | path = ytpay 3 | url = git@github.com:ytpay/dockerfiles.git 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 mritd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Dockerfile 2 | 3 | ### ⚠️⚠️⚠️ Note: Some build work of docker image is being migrated to earthly, you may not see the update commit in the current repo. 4 | ### ⚠️⚠️⚠️ Earthfile has better scalability and is more convenient for cross-compilation; the migrated dockerfle can be viewed in [https://github.com/mritd/autobuild](https://github.com/mritd/autobuild). 5 | 6 | --- 7 | 8 | This repository contains some dockerfiles of personally created docker images; 9 | it will be maintained for long periods if necessary. 10 | 11 | **The dockerfile for docker images running in a production environment has been** 12 | **moved to [ytpay/dockerfiles](https://github.com/ytpay/dockerfiles). such as `all in one build image`、`jdk`、`tomcat`;** 13 | **dockerfiles for these docker images will be maintained for a long time** 14 | 15 | ## Stargazers over time 16 | 17 | [![Stargazers over time](https://starcharts.herokuapp.com/mritd/dockerfile.svg)](https://starcharts.herokuapp.com/mritd/dockerfile) 18 | 19 | ## JetBrains 20 | 21 | Thanks to JetBrains for providing IDE support for this project, click to buy JetBrains IDE license to support the strongest IDE in the universe. 22 | 23 | [![JetBrains](jetbrains.jpeg)](https://www.jetbrains.com/) 24 | -------------------------------------------------------------------------------- /acng/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM sameersbn/apt-cacher-ng 2 | 3 | LABEL maintainer="mritd " 4 | 5 | RUN set -ex \ 6 | && apt update \ 7 | && apt install tzdata -y \ 8 | && ln -sf /dev/stdout /var/log/apt-cacher-ng/apt-cacher.log \ 9 | && ln -sf /dev/stderr /var/log/apt-cacher-ng/apt-cacher.err \ 10 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 11 | && echo ${TZ} > /etc/timezone \ 12 | && apt autoremove -y \ 13 | && apt autoclean -y \ 14 | && rm -rf /var/lib/apt/lists/* 15 | 16 | ENTRYPOINT ["/sbin/entrypoint.sh"] 17 | 18 | CMD ["/usr/sbin/apt-cacher-ng"] 19 | -------------------------------------------------------------------------------- /activemq/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:11.0.2-jre-slim-stretch 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | ENV ACTIVEMQ_VERSION 5.15.8 9 | ENV ACTIVEMQ_MQTT 1883 10 | ENV ACTIVEMQ_AMQP 5672 11 | ENV ACTIVEMQ_UI 8161 12 | ENV ACTIVEMQ_STOMP 61613 13 | ENV ACTIVEMQ_WS 61614 14 | ENV ACTIVEMQ_TCP 61616 15 | ENV ACTIVEMQ_HOME /opt/activemq 16 | ENV ACTIVEMQ apache-activemq-${ACTIVEMQ_VERSION} 17 | ENV ACTIVEMQ_DOWNLOAD_URL https://archive.apache.org/dist/activemq/${ACTIVEMQ_VERSION}/${ACTIVEMQ}-bin.tar.gz 18 | ENV ACTIVEMQ_SHA512_VAL 8c9b3216a0378f6377a9ba35f23915a3a52a1c15ac7b316bc06781d6a6ba83ce775534aa0054bd1aa37fb4d285946f914dbb21a14cc485e180a0d86c834df02e 19 | 20 | 21 | RUN apt update \ 22 | && apt upgrade -y \ 23 | && apt install bash tzdata curl -y \ 24 | && curl ${ACTIVEMQ_DOWNLOAD_URL} -o ${ACTIVEMQ}-bin.tar.gz \ 25 | && if [ "${ACTIVEMQ_SHA512_VAL}" != "$(sha512sum ${ACTIVEMQ}-bin.tar.gz | awk '{print($1)}')" ]; then \ 26 | echo "sha512 values doesn't match! exiting." && exit 1; \ 27 | fi \ 28 | && tar xzf ${ACTIVEMQ}-bin.tar.gz -C /opt \ 29 | && ln -s /opt/${ACTIVEMQ} ${ACTIVEMQ_HOME} \ 30 | && useradd activemq -U -d ${ACTIVEMQ_HOME} -s /usr/sbin/nologin \ 31 | && chown -R activemq:activemq /opt/${ACTIVEMQ} \ 32 | && chown -h activemq:activemq ${ACTIVEMQ_HOME} \ 33 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 34 | && echo ${TZ} > /etc/timezone \ 35 | && apt clean 36 | 37 | USER activemq 38 | 39 | WORKDIR ${ACTIVEMQ_HOME} 40 | 41 | EXPOSE ${ACTIVEMQ_TCP} 42 | EXPOSE ${ACTIVEMQ_AMQP} 43 | EXPOSE ${ACTIVEMQ_STOMP} 44 | EXPOSE ${ACTIVEMQ_MQTT} 45 | EXPOSE ${ACTIVEMQ_WS} 46 | EXPOSE ${ACTIVEMQ_UI} 47 | 48 | CMD ["/bin/bash", "-c", "bin/activemq console"] 49 | -------------------------------------------------------------------------------- /adb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM frolvlad/alpine-glibc:alpine-3.9_glibc-2.29 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | ENV PATH ${PATH}:/opt/platform-tools 9 | 10 | COPY update-platform-tools.sh /update-platform-tools.sh 11 | COPY adbkey* /root/.android/ 12 | 13 | RUN apk upgrade --update \ 14 | && apk add bash tzdata wget ca-certificates xmlstarlet \ 15 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 16 | && /update-platform-tools.sh \ 17 | && echo ${TZ} > /etc/timezone \ 18 | && rm -rf /var/cache/apk/* 19 | 20 | EXPOSE 5037 21 | 22 | CMD ["adb", "-a", "-P", "5037", "server", "nodaemon"] 23 | -------------------------------------------------------------------------------- /adb/adbkey: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC9KB09pq3GE2ZJ 3 | q8UDXdZ0A4QLxta/35KImWs8BEIx2fXd/wV+UKk36crDpafaDNRa3mw86O40M2xi 4 | +/zTmxzBWTxZCwdJvNJLX3BJe97QYeFzQd6z+sLdanMYfXhcv6aJ1F3v+xAHKlfQ 5 | 0fObTxZL1Hu/wkmKgkFABcoN5izEU2z4ezspsmwDFRGzID9FJMJUrcnPVbIyEfaG 6 | lUOOun/quZSxv13uHFvB91Ut/qvNI5AGNi4bAuBfDLl73pXy7JVJt+6fRmlpHvYy 7 | uElybWA0hLZPzg6G5yZxzY4YtspbNFGWCbcAB7Bw0WE8qXkcSXCAQPb30GRKPcIn 8 | 7IGHTjj9AgMBAAECggEAIHKDIZI3+ORXBYgrkXpFUT1RJ1wCdoN5dWkr1e29FSQY 9 | Yu5eGN7pSCgYmhsOgf71ZmkFFCW4xseTbh9frUTMV/Zgvb2AkIuNX1SNxG01OXWw 10 | 4L6J30HCr4yVFbxgKzjM7pO5UXM1uqTuz2lUam3Um0lluO0xBEt3ue3ETUIQp9SD 11 | tsaMZ97H6OgtMjrlsAPpaJia/Ix+1KZuXm7MoXCrz15K5BdQ672r/vo89JZUMsOF 12 | P9rKySQoOfdpBqNk9C6NchfOQfXhuvJvRW0NJf+4xd1aQIt01N79Y4xJwjmZGYsk 13 | znyJ/WWYk6iC9dFOdv3a5cjGfWhb0nqCuHOeEHO72QKBgQD3b20vuN1hv5QrKmVf 14 | HSjEtlutNdedIPB6t3DLgYf1sIZkpgITjYcqP4/wvzx4LfcvDY+xb+vMXXM0HsRb 15 | omp7/hZxNAg65aylWNfDT14Nm54DgX65KwfrWDu/joqbbyvZ08MFuymoinySs6i6 16 | 3fwcZKhtRqQvKcg+ZlFokWSQMwKBgQDDtEUIyilYmwlBYlWuCZ2u6F/IxfRrHjf1 17 | e1DZglnoF3KrXnESvp3aR1/Jv4YFUx9DED2tQ8apqMxTLHPSNjH/DDSts0ofAoJX 18 | mD3UW1Tw6nd6hDeeldpaDqV/U/HnKj1tStSYW7GsDjPdX/ZOp66z/C2kGmeFz5Dz 19 | OY9KPLEiDwKBgQDZpYLGencJF0pO2eEHVA/bUIi9iGHbTfEaEKe/6nVccOUWPUwQ 20 | ROqDCBwl6SFYmR4Xnncp3cftILpIO1P/QpMl8+9rrhgbLpG5c7d+jh6uG5dXgB2m 21 | 5Sn3IsqTid90L8rDtViTfvl6zi4boLqnfMHZe9UHIh8jeT4xXTD4qQNrLwKBgEAZ 22 | FhdH53ze4owowflLqvqzn1OqCmDfN+LOLe/fssTCkUsxloVWK2tnvybb9PBfhji3 23 | 5AuQzEubPrjrMVAjcgKgI8zUkS1Q7BH2iiG4fDyf/twA3Bqz6B1g+LGYc/2LpyzZ 24 | uoHgXnQE/tW97XVblGvc57H89/Uqw8X2D0l4UWffAoGAJdX9hO0JP32lxa7rOMIu 25 | lLGb7Wg45gO5w53KTj5HSs5mgbIBt8fc7xBYI1wztNjkEvghu3PO5VNMygD2llO4 26 | U74ya7vR5G5vx559QZmwzKropAo+yqogs/nDafjYZq1yI1VsUOL4J351jZZcH5WQ 27 | 1xT73Cm28XHkPGbqzUX+b74= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /adb/adbkey.pub: -------------------------------------------------------------------------------- 1 | QAAAAKtb1vH9OE6Hgewnwj1KZND39kCAcEkceak8YdFwsAcAtwmWUTRbyrYYjs1xJueGDs5PtoQ0YG1ySbgy9h5paUaf7rdJlezyld57uQxf4AIbLjYGkCPNq/4tVffBWxzuXb+xlLnqf7qOQ5WG9hEyslXPya1UwiRFPyCzERUDbLIpO3v4bFPELOYNygVAQYKKScK/e9RLFk+b89HQVyoHEPvvXdSJpr9ceH0Yc2rdwvqz3kFz4WHQ3ntJcF9L0rxJBwtZPFnBHJvT/PtibDM07ug8bN5a1Azap6XDyuk3qVB+Bf/d9dkxQgQ8a5mIkt+/1sYLhAN01l0DxatJZhPGraY9HSi9BbT4hrBiWiv55ef0MZYgLZp3lDdd/3bQAntfnZZP43f4ekZvpxjb3glF8E9MXcmrlAS0ONRPAvisGjcNG/U3vlL2ZH74fpolt19gOxM28S0WWRd0+35YihYXBBfIFSof54VJbwIbsH+wImNkRzJG+06X05D/SkXH9fw1CSG8HYxR3a2//HqUuM+HogS4keBceJvI8DhQyQK973IcG9DKlYkDftSTszdXLtyoetqyZ7YHI+6itfGMoRWHHKFTP+JOkNBndCgfCGcvLhmvh1MrOhDINqI+N8iErA15Ct3Ghg/+44+5QVIcKE2m3N95POuhhtkMVDKCuGFA5aGufZsoAgEAAQA= @unknown -------------------------------------------------------------------------------- /adb/update-platform-tools.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | PLATFORM="linux" 5 | REPO="https://dl.google.com/android/repository" 6 | REPOXML="${REPO}/repository-11.xml" 7 | 8 | fetch_repository_xml() { 9 | echo "Fetching ${REPOXML}" >&2 10 | wget -q -O - "$REPOXML" 11 | } 12 | 13 | parse_repository_xml() { 14 | echo "Parsing repository" >&2 15 | xmlstarlet sel -t -c "//sdk:platform-tool/sdk:archives/sdk:archive[contains(sdk:host-os,'linux')]" | xmlstarlet sel -t -v "//sdk:checksum | //sdk:url" 16 | } 17 | 18 | install_platform_tools() { 19 | local SHA="$1" 20 | local FILE_NAME="$2" 21 | local TMPFILE=$(mktemp) 22 | 23 | mkdir -p /opt 24 | echo "Fetching ${URL}" >&2 25 | wget -O "$TMPFILE" "${REPO}/${FILE_NAME}" 26 | echo "Verifying sha1 checksum ${SHA}" >&2 27 | echo "$SHA $TMPFILE" | sha1sum -sc 28 | 29 | echo "Removing previous version of platform tools if any" >&2 30 | rm -rf /opt/platform-tools 31 | 32 | echo "Unpacking platform tools" >&2 33 | unzip -d /opt "$TMPFILE" 34 | rm "$TMPFILE" 35 | 36 | echo "Platform tools installed!" >&2 37 | } 38 | 39 | install_platform_tools $(fetch_repository_xml | parse_repository_xml) 40 | -------------------------------------------------------------------------------- /alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.13 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | RUN apk upgrade \ 10 | && apk add bash tzdata bind-tools busybox-extras ca-certificates libc6-compat wget curl \ 11 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 12 | && echo ${TZ} > /etc/timezone \ 13 | && rm -rf /var/cache/apk/* 14 | 15 | CMD ["/bin/bash"] 16 | -------------------------------------------------------------------------------- /asuswrt-merlin-build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG BUILD_DATE 6 | ARG VCS_REF 7 | ARG VERSION 8 | LABEL org.label-schema.build-date=$BUILD_DATE \ 9 | org.label-schema.name="Asuswrt Merlin Build" \ 10 | org.label-schema.description="Asuswrt Merlin 固件交叉编译环境" \ 11 | org.label-schema.url="https://mritd.me" \ 12 | org.label-schema.vcs-ref=$VCS_REF \ 13 | org.label-schema.vcs-url="https://github.com/mritd/dockerfile/tree/master/asuswrt-merlin-build" \ 14 | org.label-schema.vendor="mritd" \ 15 | org.label-schema.version=$VERSION \ 16 | org.label-schema.schema-version="1.0" 17 | 18 | ENV ASUSWRT_MERLIN_VERSION 380.66 19 | 20 | COPY build.sh /root/build.sh 21 | 22 | COPY download_merlin.sh /root/download_merlin.sh 23 | 24 | RUN dpkg --add-architecture i386 \ 25 | && apt-get update -y \ 26 | && apt-get install -y \ 27 | sudo net-tools cron e2fsprogs wget vim openssl curl psmisc git \ 28 | heirloom-mailx autoconf automake bison bzip2 bsdtar diffutils \ 29 | sed file flex g++ gawk gcc-multilib gettext gperf groff-base \ 30 | zsh libncurses-dev libexpat1-dev libslang2 libssl-dev libtool \ 31 | libxml-parser-perl make patch perl pkg-config python shtool tar \ 32 | texinfo unzip zlib1g zlib1g-dev intltool autopoint libltdl7-dev \ 33 | lib32z1-dev lib32stdc++6 automake1.11 libelf-dev:i386 libelf1:i386 \ 34 | && apt-get autoremove -y \ 35 | && apt-get autoclean -y \ 36 | && rm -rf /var/lib/apt/lists/* \ 37 | && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 38 | && echo "Asia/Shanghai" > /etc/timezone \ 39 | && git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh \ 40 | && cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \ 41 | && chsh -s /bin/zsh \ 42 | && echo ". ~/build.sh" >> /root/.zshrc 43 | 44 | CMD ["zsh"] 45 | -------------------------------------------------------------------------------- /asuswrt-merlin-build/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Asuswrt Merlin 固件交叉编译环境 3 | 4 | [![](https://images.microbadger.com/badges/image/mritd/asuswrt-merlin-build.svg)](https://microbadger.com/images/mritd/asuswrt-merlin-build "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/mritd/asuswrt-merlin-build.svg)](https://microbadger.com/images/mritd/asuswrt-merlin-build "Get your own version badge on microbadger.com") 5 | 6 | > 本镜像基于 ubuntu 16.04 制作,参考了 `koolshare/koolshare-merlin-debian` 镜像(感谢原作者[Clang](https://github.com/clangcn));本镜像默认安装了大部分编译所需依赖包,**但尚未打包 Merlin 固件源码(打包后镜像体积 2G),使用时需要先从 [Merlin Release](https://github.com/RMerl/asuswrt-merlin/releases) 下载源码,并挂载到 `/home/asuswrt-merlin` 目录(如不想挂载,镜像内也提供了下载脚本),编译前请先执行 `/root/build.sh` 初始化相关环境变量(默认已经执行)** 7 | 8 | 9 | ### 1、下载源码 10 | 11 | 编译能够在 Merlin、Tomato 固件上运行的程序之前,需要先获取 Merlin 固件源码(需要其交叉编译工具链),下载地址可从 [Merlin Release](https://github.com/RMerl/asuswrt-merlin/releases) 获取 12 | 13 | ``` sh 14 | export ASUSWRT_MERLIN_VERSION=380.66 15 | wget https://github.com/RMerl/asuswrt-merlin/archive/${ASUSWRT_MERLIN_VERSION}.tar.gz 16 | tar -zxf ${ASUSWRT_MERLIN_VERSION}.tar.gz 17 | mv asuswrt-merlin-${ASUSWRT_MERLIN_VERSION} asuswrt-merlin 18 | ``` 19 | 20 | **如果 tar 命令解压出现 `Directory renamed before its status could be extracted` 错误,请安装 `bsdtar` 命令,Ubunut 下执行 `sudo apt-get install -y bsdtar`;然后使用 `bsdtar` 解压,用法同 `tar` 命令** 21 | 22 | 23 | ### 2、运行编译环境 24 | 25 | 准备好 Merlin 源码后,只需要将其挂载到 `/home/asuswrt-merlin` 目录(当然可能你需要同时挂载你要编译程序的源码目录),并运行容器即可 26 | 27 | ``` 28 | docker run -dt --name build -v /data/asuswrt-merlin:/home/asuswrt-merlin -v /data/curl-7.54.0:/root/curl-7.54.0 mritd/asuswrt-merlin-build 29 | ``` 30 | 31 | **`/data/asuswrt-merlin` 为刚刚下载的 Merlin 固件源码目录,`/data/curl-7.54.0` 为要编译的程序源码目录** 32 | 33 | ### 3、进入容器编译 34 | 35 | 容器运行后,可以通过 `docker ps` 查看其运行状态,并通过 `docker exec` 命令进入容器,**容器内默认已经安装了 `oh-my-zsh`,可以做直接已 `zsh` 进入** 36 | 37 | ``` sh 38 | docker exec -it build zsh 39 | ``` 40 | 41 | 如果不习惯 `zsh` 也可以使用 `bash` 进入容器,只需替换命令即可;交叉编译时请确保 C 编译器为 `arm-linux-gcc`,即可以声明变量 `export CC=/home/asuswrt-merlin/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/arm-linux-gcc` 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /asuswrt-merlin-build/VERSION: -------------------------------------------------------------------------------- 1 | 1.0.0 2 | -------------------------------------------------------------------------------- /asuswrt-merlin-build/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | fun_set_text_color(){ 3 | COLOR_RED='\E[1;31m' 4 | COLOR_GREEN='\E[1;32m' 5 | COLOR_YELOW='\E[1;33m' 6 | COLOR_BLUE='\E[1;34m' 7 | COLOR_PINK='\E[1;35m' 8 | COLOR_PINKBACK_WHITEFONT='\033[45;37m' 9 | COLOR_GREEN_LIGHTNING='\033[32m \033[05m' 10 | COLOR_END='\E[0m' 11 | } 12 | main(){ 13 | echo -e "${COLOR_YELOW}============== Initialized build environment ==============${COLOR_END}" 14 | if [ -d "/home/asuswrt-merlin/tools/brcm" ] && [ -d "/home/asuswrt-merlin/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3" ]; then 15 | if [ ! -L /opt/brcm-arm ] || [ ! -L /opt/brcm ]; then 16 | echo -e -n "${COLOR_PINK}link brcm & brcm-arm${COLOR_END}" 17 | ln -s /home/asuswrt-merlin/tools/brcm /opt/brcm 18 | ln -s /home/asuswrt-merlin/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3 /opt/brcm-arm 19 | if [ -L /opt/brcm-arm ] && [ -L /opt/brcm ];then 20 | echo -e " ${COLOR_GREEN}done${COLOR_END}" 21 | else 22 | echo -e " ${COLOR_RED}failed${COLOR_END}" 23 | return 1 24 | fi 25 | fi 26 | else 27 | echo -e "${COLOR_RED}[error] /home/asuswrt-merlin/ not found${COLOR_END}" 28 | return 1 29 | fi 30 | echo -e -n "${COLOR_PINK}setting Environment...${COLOR_END}" 31 | CROSS_TOOLCHAINS_DIR=/opt/brcm-arm 32 | export PATH=$PATH:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm-arm/bin 33 | export LD_LIBRARY_PATH=$CROSS_TOOLCHAINS_DIR/lib 34 | echo -e " ${COLOR_GREEN}done${COLOR_END}" 35 | #echo "$PATH" 36 | } 37 | fun_set_text_color 38 | main 39 | 40 | -------------------------------------------------------------------------------- /asuswrt-merlin-build/download_merlin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ASUSWRT_MERLIN_VERSION=380.66 4 | 5 | wget https://github.com/RMerl/asuswrt-merlin/archive/${ASUSWRT_MERLIN_VERSION}.tar.gz 6 | 7 | bsdtar -zxf ${ASUSWRT_MERLIN_VERSION}.tar.gz 8 | 9 | mv asuswrt-merlin-${ASUSWRT_MERLIN_VERSION} /home/asuswrt-merlin 10 | 11 | -------------------------------------------------------------------------------- /asuswrt-merlin-build/hooks/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Build hook running..." 4 | 5 | IMAGE_VERSION=`cat VERSION` 6 | 7 | docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ 8 | --build-arg VCS_REF=`git rev-parse --short HEAD` \ 9 | --build-arg VERSION=$IMAGE_VERSION \ 10 | -t $IMAGE_NAME . 11 | 12 | -------------------------------------------------------------------------------- /caddy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.16-alpine3.13 AS builder 2 | 3 | RUN set -e \ 4 | && apk upgrade \ 5 | && apk add jq curl git \ 6 | && export version=$(curl -s "https://api.github.com/repos/caddyserver/caddy/releases/latest" | jq -r .tag_name) \ 7 | && echo ">>>>>>>>>>>>>>> ${version} ###############" \ 8 | && go get -u github.com/caddyserver/xcaddy/cmd/xcaddy \ 9 | && xcaddy build ${version} --output /caddy \ 10 | --with github.com/caddy-dns/route53 \ 11 | --with github.com/caddy-dns/cloudflare \ 12 | --with github.com/caddy-dns/alidns \ 13 | --with github.com/caddy-dns/dnspod \ 14 | --with github.com/caddy-dns/gandi \ 15 | --with github.com/abiosoft/caddy-exec \ 16 | --with github.com/greenpau/caddy-trace \ 17 | --with github.com/hairyhenderson/caddy-teapot-module \ 18 | --with github.com/kirsch33/realip \ 19 | --with github.com/porech/caddy-maxmind-geolocation \ 20 | --with github.com/caddyserver/format-encoder \ 21 | --with github.com/caddyserver/replace-response \ 22 | --with github.com/imgk/caddy-trojan 23 | 24 | 25 | FROM alpine:3.13 AS dist 26 | 27 | LABEL maintainer="mritd " 28 | 29 | # See https://caddyserver.com/docs/conventions#file-locations for details 30 | ENV XDG_CONFIG_HOME /config 31 | ENV XDG_DATA_HOME /data 32 | 33 | ENV TZ Asia/Shanghai 34 | 35 | COPY --from=builder /caddy /usr/bin/caddy 36 | ADD https://raw.githubusercontent.com/caddyserver/dist/master/config/Caddyfile /etc/caddy/Caddyfile 37 | ADD https://raw.githubusercontent.com/caddyserver/dist/master/welcome/index.html /usr/share/caddy/index.html 38 | 39 | # set up nsswitch.conf for Go's "netgo" implementation 40 | # - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275 41 | # - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf 42 | RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf 43 | 44 | RUN set -e \ 45 | && apk upgrade \ 46 | && apk add bash tzdata mailcap \ 47 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 48 | && echo ${TZ} > /etc/timezone \ 49 | && rm -rf /var/cache/apk/* 50 | 51 | VOLUME /config 52 | VOLUME /data 53 | 54 | EXPOSE 80 55 | EXPOSE 443 56 | EXPOSE 2019 57 | 58 | WORKDIR /srv 59 | 60 | CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"] 61 | -------------------------------------------------------------------------------- /cfssl-build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.15-stretch 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | RUN set -ex \ 10 | && apt update \ 11 | && apt upgrade -y \ 12 | && apt install tzdata ruby ruby-dev rubygems fakeroot build-essential -y \ 13 | && gem install --no-document fpm \ 14 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 15 | && echo ${TZ} > /etc/timezone \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | COPY build.sh /go/build.sh 19 | 20 | VOLUME /dist 21 | 22 | CMD ["/bin/bash"] 23 | -------------------------------------------------------------------------------- /cfssl-build/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | CGO_ENABLE=0 6 | 7 | SOURCE_DIR='/go/src/github.com/cloudflare/cfssl' 8 | 9 | git clone https://github.com/cloudflare/cfssl.git ${SOURCE_DIR} 10 | 11 | cd ${SOURCE_DIR} && make package-deb && mv *.deb /dist/ 12 | -------------------------------------------------------------------------------- /chrome-headless/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | MAINTAINER mritd 4 | 5 | ENV TZ 'Asia/Shanghai' 6 | ENV CHROME_VERSION 67.0.3396.79 7 | ENV CHROME_APT "deb https://dl.google.com/linux/chrome/deb/ stable main" 8 | 9 | RUN apt update -y && apt upgrade -y \ 10 | && apt install wget tzdata libnss3 libnss3-tools libfontconfig1 \ 11 | gnupg2 ca-certificates apt-transport-https inotify-tools -y \ 12 | && echo ${CHROME_APT} > /etc/apt/sources.list.d/google-chrome.list \ 13 | && wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \ 14 | && apt update -y && apt upgrade -y \ 15 | && apt install google-chrome-stable=${CHROME_VERSION}-1 -y \ 16 | && apt autoremove -y && apt autoclean -y \ 17 | && mkdir /data \ 18 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 19 | && echo ${TZ} > /etc/timezone \ 20 | && rm -rf /var/lib/apt/lists/* /var/cache/apt/* 21 | 22 | COPY entrypoint.sh / 23 | 24 | EXPOSE 9222 25 | VOLUME /data 26 | 27 | ENTRYPOINT ["/entrypoint.sh"] 28 | -------------------------------------------------------------------------------- /chrome-headless/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | google-chrome-stable \ 6 | --disable-gpu \ 7 | --headless \ 8 | --no-sandbox \ 9 | --remote-debugging-address=0.0.0.0 \ 10 | --remote-debugging-port=9222 \ 11 | --user-data-dir=/data $@ 12 | -------------------------------------------------------------------------------- /confluence/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM atlassian/confluence-server:7.4.1 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | ENV AGENT_PATH /opt/atlassian-agent.jar 9 | 10 | COPY atlassian-agent.jar ${AGENT_PATH} 11 | COPY hijack.sh /hijack.sh 12 | 13 | RUN set -x \ 14 | && export DEBIAN_FRONTEND=noninteractive \ 15 | && apt update \ 16 | && apt upgrade -y \ 17 | && apt install tzdata -y \ 18 | && chown ${RUN_USER}:${RUN_GROUP} ${AGENT_PATH} \ 19 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 20 | && echo ${TZ} > /etc/timezone \ 21 | && dpkg-reconfigure --frontend noninteractive tzdata \ 22 | && apt autoremove -y \ 23 | && apt autoclean -y 24 | 25 | CMD ["/hijack.sh"] 26 | -------------------------------------------------------------------------------- /confluence/atlassian-agent.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mritd/dockerfile/6686c3423f3939e3f4a1fbe6f02c03a954dd6cb9/confluence/atlassian-agent.jar -------------------------------------------------------------------------------- /confluence/hijack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export JAVA_OPTS="${JAVA_OPTS} -javaagent:${AGENT_PATH}" 4 | 5 | # If you want to use SECURE_SMTP, mount the /opt/atlassian/confluence/conf directory 6 | # and follow the link documentation to modify the configuration. 7 | # refs https://confluence.atlassian.com/doc/setting-up-a-mail-session-for-the-confluence-distribution-6328.html 8 | if [ "${JNDI_EMAIL}" == "true" ]; then 9 | mv ${CONFLUENCE_INSTALL_DIR}/confluence/WEB-INF/lib/javax.mail-*.jar ${CONFLUENCE_INSTALL_DIR}/lib/ 10 | fi 11 | 12 | /entrypoint.py -fg 13 | -------------------------------------------------------------------------------- /demo/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.19-alpine 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ='Asia/Shanghai' 6 | ENV TZ ${TZ} 7 | 8 | RUN apk upgrade --update \ 9 | && apk add bash tzdata curl wget ca-certificates \ 10 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 11 | && echo ${TZ} > /etc/timezone \ 12 | && rm -rf /var/cache/apk/* 13 | 14 | COPY index.html /usr/share/nginx/html/index.html 15 | 16 | COPY docker.png /usr/share/nginx/html/docker.png 17 | 18 | EXPOSE 80 443 19 | 20 | CMD ["nginx", "-g", "daemon off;"] 21 | -------------------------------------------------------------------------------- /demo/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mritd/dockerfile/6686c3423f3939e3f4a1fbe6f02c03a954dd6cb9/demo/docker.png -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Running! 6 | 14 | 15 | 16 |
17 |

Your container is running!

18 | docker 19 |
20 | 21 | -------------------------------------------------------------------------------- /docker-kubectl/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker:20 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | ENV KUBE_VERSION v1.21.1 10 | ENV KUBECTL_DOWNLOAD_URL https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl 11 | 12 | RUN apk upgrade --update \ 13 | && apk add bash curl tzdata wget ca-certificates git \ 14 | && wget -q ${KUBECTL_DOWNLOAD_URL} -O /usr/local/bin/kubectl \ 15 | && chmod +x /usr/local/bin/kubectl \ 16 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 17 | && echo ${TZ} > /etc/timezone \ 18 | && rm -rf /var/cache/apk/* 19 | 20 | CMD ["/bin/bash"] 21 | -------------------------------------------------------------------------------- /elastalert/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.6.10-alpine3.11 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | ENV VERSION v0.2.4 9 | ENV SOURCE_DIR /usr/local/elastalert 10 | ENV CONFIG_DIR /etc/elastalert 11 | ENV DOWNLOAD_URL https://github.com/Yelp/elastalert/archive/${VERSION}.tar.gz 12 | 13 | RUN set -ex \ 14 | && apk upgrade \ 15 | && apk add bash wget curl ca-certificates tzdata openssl libmagic \ 16 | && apk add --virtual .build-deps tar openssl-dev libffi-dev gcc musl-dev \ 17 | && mkdir -p ${SOURCE_DIR} ${CONFIG_DIR} \ 18 | && wget ${DOWNLOAD_URL} -O elastalert.tar.gz \ 19 | && tar -zxf elastalert.tar.gz -C ${SOURCE_DIR} --strip-components 1 \ 20 | && (cd ${SOURCE_DIR} \ 21 | && pip install -r requirements.txt \ 22 | && python setup.py install) \ 23 | && cp ${SOURCE_DIR}/config.yaml.example ${CONFIG_DIR}/config.yaml \ 24 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 25 | && echo ${TZ} > /etc/timezone \ 26 | && apk del .build-deps \ 27 | && rm -rf ~/.cache elastalert.tar.gz ${SOURCE_DIR} /var/cache/apk/* 28 | 29 | ENTRYPOINT ["elastalert"] 30 | 31 | CMD ["--verbose","--config","/etc/elastalert/config.yaml"] 32 | -------------------------------------------------------------------------------- /fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ruby:2.7.2-alpine3.12 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | RUN apk upgrade --update \ 10 | && apk add bash tzdata make gcc libc-dev tar git \ 11 | && git clone https://github.com/jordansissel/fpm.git \ 12 | && (cd fpm && make install) \ 13 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 14 | && echo ${TZ} > /etc/timezone \ 15 | && rm -rf fpm /var/cache/apk/* 16 | 17 | CMD ["/bin/bash"] 18 | -------------------------------------------------------------------------------- /frp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.11 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ='Asia/Shanghai' 6 | 7 | ENV TZ ${TZ} 8 | ENV VERSION 0.30.0 9 | ENV DOWNLOAD_URL https://github.com/fatedier/frp/releases/download/v${VERSION}/frp_${VERSION}_linux_amd64.tar.gz 10 | 11 | RUN apk upgrade --update \ 12 | && apk add bash tzdata curl \ 13 | && curl -sSLO ${DOWNLOAD_URL} \ 14 | && tar -zxf frp_${VERSION}_linux_amd64.tar.gz \ 15 | && rm -f frp_${VERSION}_linux_amd64/LICENSE \ 16 | && mv frp_${VERSION}_linux_amd64/*.ini /etc \ 17 | && mv frp_${VERSION}_linux_amd64/* /usr/bin \ 18 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 19 | && echo "${TZ}" > /etc/timezone \ 20 | && apk del curl \ 21 | && rm -rf frp_${VERSION}_linux_amd64.tar.gz \ 22 | frp_${VERSION}_linux_amd64 \ 23 | /var/cache/apk/* 24 | 25 | CMD ["frps","-c","/etc/frps.ini"] 26 | -------------------------------------------------------------------------------- /gh-pages/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.13 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | COPY Gemfile Gemfile 10 | 11 | RUN apk upgrade --update \ 12 | && apk add bash build-base libffi zlib libxml2 \ 13 | libxslt ruby ruby-io-console ruby-json yaml \ 14 | nodejs git perl tzdata \ 15 | && apk add --virtual .build-deps \ 16 | build-base libffi-dev zlib-dev libxml2-dev \ 17 | libxslt-dev ruby-dev \ 18 | && echo 'gem: --no-document' >> ~/.gemrc \ 19 | && cp ~/.gemrc /etc/gemrc \ 20 | && chmod uog+r /etc/gemrc \ 21 | && gem install bundler \ 22 | && bundle config build.jekyll --no-rdoc \ 23 | && bundle install \ 24 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 25 | && echo ${TZ} > /etc/timezone \ 26 | && apk del .build-deps \ 27 | && rm -rf /Gemfile* \ 28 | /var/cache/apk/* \ 29 | /usr/lib/lib/ruby/gems/*/cache/* \ 30 | ~/.gem 31 | 32 | WORKDIR /root 33 | 34 | CMD ["/bin/bash"] 35 | -------------------------------------------------------------------------------- /gh-pages/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | require 'json' 4 | require 'open-uri' 5 | versions = JSON.parse(open('https://pages.github.com/versions.json').read) 6 | 7 | gem 'jekyll', versions['jekyll'] 8 | gem 'jekyll-sass-converter', versions['jekyll-sass-converter'] 9 | gem 'kramdown', versions['kramdown'] 10 | gem 'liquid', versions['liquid'] 11 | gem 'rouge', versions['rouge'] 12 | gem 'jemoji', versions['jemoji'] 13 | gem 'jekyll-mentions', versions['jekyll-mentions'] 14 | gem 'jekyll-redirect-from', versions['jekyll-redirect-from'] 15 | gem 'jekyll-sitemap', versions['jmekyll-sitemap'] 16 | gem 'jekyll-feed', versions['jekyll-feed'] 17 | gem 'jekyll-gist', versions['jekyll-gist'] 18 | gem 'jekyll-paginate', versions['jekyll-paginate'] 19 | gem 'github-pages-health-check', versions['github-pages-health-check'] 20 | gem 'jekyll-coffeescript', versions['jekyll-coffeescript'] 21 | gem 'jekyll-seo-tag', versions['jekyll-seo-tag'] 22 | gem 'github-pages', versions['github-pages'] 23 | gem 'jekyll-github-metadata', versions['jekyll-github-metadata'] 24 | gem 'html-pipeline', versions['html-pipeline'] 25 | gem 'listen', versions['listen'] 26 | gem 'sass', versions['sass'] 27 | gem 'safe_yaml', versions['safe_yaml'] 28 | gem 'html-proofer' 29 | -------------------------------------------------------------------------------- /html/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.19.0-alpine 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ='Asia/Shanghai' 6 | ENV TZ ${TZ} 7 | 8 | RUN apk upgrade --update \ 9 | && apk add bash tzdata curl wget ca-certificates \ 10 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 11 | && echo ${TZ} > /etc/timezone \ 12 | && rm -rf /usr/share/nginx/html /var/cache/apk/* 13 | 14 | COPY landscape-animation-experiment /usr/share/nginx/html 15 | 16 | EXPOSE 80 443 17 | 18 | CMD ["nginx", "-g", "daemon off;"] 19 | -------------------------------------------------------------------------------- /html/landscape-animation-experiment/README.txt: -------------------------------------------------------------------------------- 1 | A Pen created at CodePen.io. You can find this one at https://codepen.io/mritd/pen/BvMadM. 2 | 3 | Best in full view - http://louie.co.nz/25th_hour/ 4 | She's a resource hungry beast, downscale your browser window if the frame rate is going funky. 5 | -------------------------------------------------------------------------------- /html/landscape-animation-experiment/css/style.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:300); 2 | 3 | /* Global Styles 4 | ---------------------------------------------- */ 5 | html {font-family: 'Open Sans', sans-serif; background: #0D133A; height:100%; font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;overflow: hidden;position: relative;} 6 | body {height:100%;overflow: hidden; margin: 0; font-size: 1em; line-height: 1.4; position: relative;} 7 | img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; } 8 | svg:not(:root) { overflow: hidden; } 9 | a{color: white;text-decoration: none;} 10 | 11 | /* Animation globals 12 | ---------------------------------------------- */ 13 | #landscape, .land, #bottom, .stags,.stag, .counter:before, #lensFlare, .sunMask{ 14 | -webkit-animation-duration: 60s; 15 | -webkit-animation-iteration-count: infinite; 16 | -webkit-animation-timing-function: linear; 17 | } 18 | 19 | /* Background gradients 20 | ---------------------------------------------- */ 21 | #sky{ 22 | height: 60%; 23 | margin-bottom: -6px; 24 | position: absolute; 25 | top: 0px; 26 | z-index: 2; 27 | } 28 | #sky-rect{height:100%;} 29 | 30 | #reflection, #sunMask{ 31 | height: 40%; 32 | position: absolute; 33 | top: 60%; 34 | z-index: 4; 35 | } 36 | #reflection-rect{height:100%;} 37 | #sunMask{ 38 | background: #0D133A; 39 | height: 40%; 40 | position: absolute; 41 | top: 60%; 42 | width: 100%; 43 | } 44 | 45 | /* Stag 46 | ---------------------------------------------- */ 47 | #stag{ 48 | position: absolute; 49 | bottom: 15.3%; 50 | width: 6.3%; 51 | left: 38%; 52 | z-index: 5; 53 | } 54 | .stag{ 55 | width:100%; 56 | position: absolute; 57 | bottom: 0px; 58 | } 59 | .stags{ 60 | -webkit-animation-name: stags; 61 | } 62 | @-webkit-keyframes stags{ 63 | 0% { fill:#0D141E;} 64 | 4% { fill:#101522;} 65 | 8% { fill:#121726;} 66 | 12% { fill:#141829;} 67 | 16% { fill:#1C1E3C;} 68 | 20% { fill:#22214F;} 69 | 24% { fill:#262262;} 70 | 28% { fill:#1D4065;} 71 | 32% { fill:#125768;} 72 | 36% { fill:#1E4553;} 73 | 40% { fill:#1E404E;} 74 | 44% { fill:#1E3B49;} 75 | 48% { fill:#1D3643;} 76 | 52% { fill:#1C313E;} 77 | 56% { fill:#1C3344;} 78 | 60% { fill:#1C3449;} 79 | 64% { fill:#1B344F;} 80 | 68% { fill:#183454;} 81 | 72% { fill:#242B4A;} 82 | 76% { fill:#2B2241;} 83 | 80% { fill:#24203C;} 84 | 84% { fill:#1D1D37;} 85 | 88% { fill:#151A32;} 86 | 92% { fill:#14192C;} 87 | 96% { fill:#111725;} 88 | 100% { fill:#0D141E;} 89 | } 90 | #stag1{ 91 | -webkit-animation-name: stag_one; 92 | width: 108%; 93 | left: -20%; 94 | 95 | } 96 | @-webkit-keyframes stag_one{ 97 | 0% {opacity:1.0;} 98 | 15% {opacity:1.0;} 99 | 20% {opacity:0.0;} 100 | 90% {opacity:0.0;} 101 | 95% {opacity:1.0;} 102 | 100% {opacity:1.0;} 103 | } 104 | #stag2{ 105 | -webkit-animation-name: stag_two; 106 | } 107 | @-webkit-keyframes stag_two{ 108 | 0% {opacity:0.0;} 109 | 17% {opacity:0.0;} 110 | 20% {opacity:1.0;} 111 | 40% {opacity:1.0;} 112 | 45% {opacity:0.0;} 113 | 65% {opacity:0.0;} 114 | 70% {opacity:1.0;} 115 | 90% {opacity:1.0;} 116 | 95% {opacity:0.0;} 117 | 100% {opacity:0.0;} 118 | } 119 | #stag3{ 120 | -webkit-animation-name: stag_three; 121 | width: 144%; 122 | left: -10%; 123 | bottom: -3%; 124 | } 125 | @-webkit-keyframes stag_three{ 126 | 0% {opacity:0.0;} 127 | 15% {opacity:0.0;} 128 | 20% {opacity:0.0;} 129 | 40% {opacity:0.0;} 130 | 45% {opacity:1.0;} 131 | 65% {opacity:1.0;} 132 | 70% {opacity:0.0;} 133 | 100% {opacity:0.0;} 134 | } 135 | 136 | /* Sun 137 | ---------------------------------------------- */ 138 | .sunMask{ 139 | position:absolute; 140 | width:100%; 141 | height:100%; 142 | -webkit-mask-image: -webkit-gradient(linear, left 50%, left 60%, from(rgba(0,0,0,1)), to(rgba(0,0,0,0))); 143 | z-index: 4; 144 | mix-blend-mode: screen; 145 | -webkit-animation-name: sunFocus; 146 | } 147 | @-webkit-keyframes sunFocus{ 148 | 0% { -webkit-filter: blur(10px);} 149 | 16% {-webkit-filter: blur(10px);} 150 | 20% {-webkit-filter: blur(10px);} 151 | 25% {-webkit-filter: blur(5px);} 152 | 30% {-webkit-filter: blur(0px);} 153 | 80% {-webkit-filter: blur(0px);} 154 | 88% {-webkit-filter: blur(5px);} 155 | 100% {-webkit-filter: blur(10px);} 156 | } 157 | .sun{ 158 | width: 100%; 159 | padding-bottom: 100%; 160 | position:absolute; 161 | right: -51%; 162 | top: -330%; 163 | } 164 | .sun div{ 165 | background: transparent url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/21555/sun.svg); 166 | position: absolute; 167 | top: 0; bottom: 0; left: 0; right: 0; 168 | } 169 | .suncrane{ 170 | animation: suncrane 60s linear infinite; 171 | position:absolute; 172 | width: 21%; 173 | height: 4%; 174 | background: transparent; 175 | margin: auto; 176 | top: 57%; 177 | left: 0; 178 | right: 0; 179 | } 180 | @keyframes suncrane{ 181 | 0% {transform:rotate(90deg);} 182 | 100% {transform:rotate(-270deg);} 183 | } 184 | .sun:before{ 185 | display:block; 186 | content:' '; 187 | animation: glare 60s linear infinite; 188 | position:absolute; 189 | width: 120%; 190 | height: 120%; 191 | background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/21555/glare.svg) no-repeat scroll center; 192 | top: -10%; 193 | left: -10%; 194 | background-size: 100%; 195 | } 196 | 197 | @keyframes glare{ 198 | from {transform:rotate(90deg);opacity:0.0;} 199 | 30%{opacity:0.0;} 200 | 36%{opacity:1.0;} 201 | 68%{opacity:1.0;} 202 | 74%{opacity:0.0;} 203 | to {transform:rotate(450deg);opacity:0.0;} 204 | } 205 | 206 | 207 | .sun:after{display: block; content:' '; position:absolute;background: white;width: 10%;height: 10%;top: 45%;border-radius: 100%;margin: auto;left: 0;right: 0;box-shadow: 0px 0px 80px 30px white;} 208 | 209 | /* Clouds 210 | ---------------------------------------------- */ 211 | .clouds{ 212 | position: absolute; 213 | width: 100%; 214 | z-index: 4; mix-blend-mode: screen; 215 | height: 100%; 216 | } 217 | .clouds svg{ 218 | width: 60%; 219 | position: absolute; 220 | top: 51%; 221 | -webkit-filter: blur(2px); 222 | opacity: 0.4; 223 | left: -60%; 224 | -webkit-animation-duration: 60s; 225 | -webkit-animation-iteration-count: infinite; 226 | -webkit-animation-timing-function: linear; 227 | -webkit-animation-name: clouds; 228 | } 229 | @-webkit-keyframes clouds{ 230 | 0% {transform: translate3d(110%, 0px, 0px);opacity: 0.0;} 231 | 19%{opacity: 0.0;-webkit-filter: blur(5px);} 232 | 25%{opacity: 0.3;-webkit-filter: blur(2px);} 233 | 50%{opacity: 0.6;} 234 | 75%{opacity: 0.2;} 235 | 90%{opacity: 0.0;} 236 | 100% {transform: translate3d(150%, 0px, 0px);opacity: 0.0} 237 | } 238 | 239 | /* Lens flare 240 | ---------------------------------------------- */ 241 | .lighting{ 242 | width: 100%; 243 | height: 100%; 244 | position: absolute; 245 | z-index: 8; 246 | opacity: 0.3; 247 | -webkit-mask-image: -webkit-gradient(linear, left 50%, left 60%, from(rgba(0,0,0,1)), to(rgba(0,0,0,1))); 248 | mix-blend-mode: screen; 249 | pointer-events: none; 250 | -webkit-filter: blur(3px); 251 | } 252 | .lighting .suncrane{ 253 | width: 100%; 254 | } 255 | #lensFlare{ 256 | transform: rotate(16deg) translate3d(9%, -47%, 0px) scale(1); 257 | -webkit-animation-name: flaring; 258 | } 259 | 260 | @-webkit-keyframes flaring{ 261 | 0% { transform: rotate(16deg) translate3d(9%, -47%, 0px) scale(1); opacity: 0.0;} 262 | 28% { transform: rotate(16deg) translate3d(9%, -47%, 0px) scale(1); opacity: 0.0; } 263 | 35% { transform: rotate(16deg) translate3d(9%, -47%, 0px) scale(1); opacity: 1.0; } 264 | 70% { transform: rotate(16deg) translate3d(9%, -47%, 0px) scale(1); opacity: 1.0; } 265 | 78% { transform: rotate(16deg) translate3d(9%, -47%, 0px) scale(1); opacity: 0.0; } 266 | 100% { transform: rotate(16deg) translate3d(9%, -47%, 0px) scale(1); opacity: 0.0; } 267 | } 268 | 269 | /* Sun on lake twinkles 270 | ---------------------------------------------- */ 271 | .twinkleWrap{ 272 | position: absolute; 273 | z-index: 4; 274 | width:100%; 275 | height:100%; 276 | top:0; 277 | opacity: 0.55; 278 | } 279 | 280 | .twinkles{ 281 | width: 2.3%; 282 | position: absolute; 283 | right: 49.2%; 284 | top: 72.5%; 285 | animation: twinkles 60s linear infinite; 286 | } 287 | @-webkit-keyframes twinkles{ 288 | 0% {transform: translate(450%, 0%);opacity:0.0;} 289 | 32%{opacity:0.0;} 290 | 34%{opacity:1.0;} 291 | 36.5% {transform: translate(450%, 0%);} 292 | 54% {transform: translate(0%, 0%);} 293 | 72% {transform: translate(-450%, 0%);opacity:1.0;} 294 | 78%{opacity:0.0;} 295 | 100% {transform: translate(-450%, 0%);opacity:0.0;} 296 | } 297 | .twinkles:before{ 298 | content:' '; 299 | display: none; 300 | position:absolute; 301 | height: 600px; 302 | width:3px; 303 | background:red; 304 | top: -600px; 305 | left: 50%; 306 | } 307 | .twinkles svg{ 308 | width: 100%; 309 | position: absolute; 310 | top: 0; 311 | } 312 | #twinkle1{ 313 | animation: twinkle1 2s linear infinite; 314 | } 315 | @-webkit-keyframes twinkle1{ 316 | 0% {opacity:1.0;} 317 | 33.33% {opacity:0.0;} 318 | 66.66% {opacity:0.0;} 319 | 99.99% {opacity:1.0;} 320 | 100% {opacity:1.0;} 321 | } 322 | #twinkle2{ animation: twinkle2 2s linear infinite; 323 | } 324 | @-webkit-keyframes twinkle2{ 325 | 0% {opacity:0.0;} 326 | 33.33% {opacity:1.0;} 327 | 66.66% {opacity:0.0;} 328 | 99.99% {opacity:0.0;} 329 | 100% {opacity:0.0;} 330 | } 331 | #twinkle3{ animation: twinkle3 2s linear infinite; 332 | } 333 | @-webkit-keyframes twinkle3{ 334 | 0% {opacity:0.0;} 335 | 33.33% {opacity:0.0;} 336 | 66.66% {opacity:1.0;} 337 | 99.99% {opacity:0.0;} 338 | 100% {opacity:0.0;} 339 | } 340 | 341 | /* Vignette 342 | ---------------------------------------------- */ 343 | .vignette{ 344 | background: radial-gradient(transparent 60%, rgb(1, 14, 39) 130%); 345 | background-size: cover; 346 | height: 100%; 347 | z-index: 9; 348 | position: absolute; 349 | width: 100%; 350 | pointer-events: none; 351 | } 352 | 353 | /* Stars 354 | ---------------------------------------------- */ 355 | .stars{ 356 | height: 100%; 357 | z-index: 2; 358 | position: absolute; 359 | width: 100%; 360 | 361 | overflow: hidden; 362 | } 363 | .starWrap{ 364 | height: 60%; 365 | width: 100%; 366 | position:relative; 367 | } 368 | .starProject{ 369 | overflow: hidden; 370 | } 371 | .starReflect{ 372 | overflow: hidden; 373 | height: 40%; 374 | opacity: 0.9; 375 | top: 1%; 376 | } 377 | #stars{ 378 | position: absolute; 379 | width: 120%; 380 | border-radius: 100%; 381 | margin: auto; 382 | left: -10%; 383 | right: 0; 384 | animation: stars 120s linear infinite; 385 | transform: rotate(0deg); 386 | top: -35%; 387 | } 388 | 389 | @-webkit-keyframes stars{ 390 | 100% {transform: rotate(-360deg);} 391 | } 392 | 393 | #starReflection{ 394 | position: absolute; 395 | width: 120%; 396 | border-radius: 100%; 397 | margin: auto; 398 | left: -10%; 399 | right: 0; 400 | animation: starsReflect 120s linear infinite; 401 | transform: rotate(0deg); 402 | top:initial; 403 | bottom: -102%; 404 | } 405 | @-webkit-keyframes starsReflect{ 406 | 100% {transform: rotate(360deg);} 407 | } 408 | 409 | /* Sprites 410 | ----------------------------------------------- */ 411 | .spriteWrap{ 412 | height: 100%; 413 | width: 100%; 414 | position: absolute; 415 | z-index: 13; 416 | animation: sprites 60s linear infinite; 417 | pointer-events: none; 418 | } 419 | @-webkit-keyframes sprites{ 420 | 0% {opacity:0.8;} 421 | 20% {opacity:0.8;} 422 | 25%{opacity:0.0;} 423 | 73% {opacity:0.0;} 424 | 90% {opacity:0.8;} 425 | 100% {opacity:0.8;} 426 | } 427 | 428 | #sprites{ 429 | height: 100%; 430 | width: 100%; 431 | } 432 | 433 | /* Controls 434 | ---------------------------------------------- */ 435 | .controls{ 436 | position:absolute; 437 | top:0px; 438 | width 20%; 439 | z-index: 10; 440 | background: rgba(0, 0, 0, 0.16); 441 | height: 100%; 442 | width: 380px; 443 | padding: 23px; 444 | -webkit-transform: translate3d(-250px, 0px, 0px); 445 | -moz-transform: translate3d(-250px, 0px, 0px); 446 | -o-transform: translate3d(-250px, 0px, 0px); 447 | -ms-transform: translate3d(-250px, 0px, 0px); 448 | transform: translate3d(-250px, 0px, 0px); 449 | opacity: 0; 450 | } 451 | .controls, .controls *{ 452 | -webkit-box-sizing: border-box; 453 | -moz-box-sizing: border-box; 454 | box-sizing: border-box; 455 | -webkit-transition: all 0.25s ease; -moz-transition: all 0.25s ease; -o-transition: all 0.25s ease; transition: all 0.25s ease; 456 | } 457 | .controls:hover{ 458 | -webkit-transform: translate3d(0px, 0px, 0px); 459 | -moz-transform: translate3d(0px, 0px, 0px); 460 | -o-transform: translate3d(0px, 0px, 0px); 461 | -ms-transform: translate3d(0px, 0px, 0px); 462 | transform: translate3d(0px, 0px, 0px); 463 | opacity: 1.0; 464 | } 465 | .controls ul{ 466 | margin: 0px; 467 | padding: 0px; 468 | list-style: none; 469 | } 470 | .controls ul li{ 471 | border-bottom: 1px solid rgba(255, 255, 255, 0.09); 472 | color: white; 473 | } 474 | .controls ul li span.title{ 475 | display: inline-block; 476 | padding: 10px 0px; 477 | } 478 | .controls ul li a{ 479 | display: block; 480 | padding: 10px 0px; 481 | } 482 | .controls ul li a:hover{ 483 | padding-left: 10px; 484 | } 485 | .controls ul li a.active{} 486 | .controls ul li a.active:after{content: 'on';float: right;} 487 | .controls audio{ 488 | width: 100%; 489 | opacity: 0.2; 490 | position: relative; 491 | width: 80%; 492 | display: inline-block; 493 | top: 8px; 494 | float: right; 495 | } 496 | .controls audio:hover{opacity:1.0;} 497 | .noise{ 498 | width:100%; 499 | height:100%; 500 | background:transparent; 501 | opacity:0.03; 502 | z-index: 9; 503 | position: absolute; 504 | top: 0; 505 | pointer-events: none; 506 | } 507 | .noise.active{ 508 | background: transparent url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/21555/static2.gif); 509 | opacity: 0.015; 510 | background-size: 620px; 511 | } 512 | .counter{ 513 | color: rgba(255, 255, 255, 0.12); 514 | position: absolute; 515 | width: calc(100% - 46px); 516 | bottom: 21px; 517 | text-align:justify; 518 | font-size: 0px; 519 | } 520 | .counter:before{ 521 | content: ':'; 522 | display:inline-block; 523 | position: absolute; 524 | -webkit-animation-name: timer; 525 | background: rgba(255, 255, 255, 0.03); 526 | text-align: right; 527 | left:0px; 528 | bottom: 0px; 529 | color: transparent; 530 | border-right: 1px solid rgba(255, 255, 255, 0.13); 531 | line-height: 34px; 532 | } 533 | @-webkit-keyframes timer{ 534 | 0% { width:0%; } 535 | 100% { width:100%; } 536 | } 537 | 538 | /* Landscape 539 | ---------------------------------------------- */ 540 | #landscape{ 541 | width: 100.02%; 542 | position: absolute; 543 | bottom: 11%; 544 | z-index: 5; 545 | -webkit-animation-name: focus; 546 | } 547 | @-webkit-keyframes focus{ 548 | 0% { -webkit-filter: blur(5px);} 549 | 16% {-webkit-filter: blur(2px);} 550 | 20% {-webkit-filter: blur(0px);} 551 | 80% {-webkit-filter: blur(0px);} 552 | 88% {-webkit-filter: blur(2px);} 553 | 100% {-webkit-filter: blur(5px);} 554 | } 555 | 556 | #bottom{ 557 | -webkit-animation-name: bottomFill; 558 | height: 100%; 559 | position: absolute; 560 | top: 88%; 561 | width: 100%; 562 | z-index: 5; 563 | } 564 | @-webkit-keyframes bottomFill{ 565 | 0% { background:#0D141E; } 566 | 4% { background:#101522; } 567 | 8% { background:#121726; } 568 | 12% { background:#141829; } 569 | 16% { background:#1C1E3C; } 570 | 20% { background:#22214F; } 571 | 24% { background:#262262; } 572 | 28% { background:#1D4065; } 573 | 32% { background:#125768; } 574 | 36% { background:#1E4553; } 575 | 40% { background:#1E404E; } 576 | 44% { background:#1E3B49; } 577 | 48% { background:#1D3643; } 578 | 52% { background:#1C313E; } 579 | 56% { background:#1C3344; } 580 | 60% { background:#1C3449; } 581 | 64% { background:#1B344F; } 582 | 68% { background:#183454; } 583 | 72% { background:#242B4A; } 584 | 76% { background:#2B2241; } 585 | 80% { background:#24203C; } 586 | 84% { background:#1D1D37; } 587 | 88% { background:#151A32; } 588 | 92% { background:#14192C; } 589 | 96% { background:#111725; } 590 | 100% { background:#0D141E; } 591 | } 592 | 593 | /* Land - layer 1 animation */ 594 | #landscape .layer1 { 595 | fill:#F1F2F2; 596 | -webkit-animation-name: layer1; 597 | } 598 | @-webkit-keyframes layer1{ 599 | 0% { fill:#244154; } 600 | 4% { fill:#344358; } 601 | 8% { fill:#42465D; } 602 | 12% { fill:#4F4761; } 603 | 16% { fill:#7E5773; } 604 | 20% { fill:#A3517F; } 605 | 24% { fill:#F3829F; } 606 | 28% { fill:#D4B2AF; } 607 | 32% { fill:#AEDABB; } 608 | 36% { fill:#A1D6D6; } 609 | 40% { fill:#9ED5DD; } 610 | 44% { fill:#9AD4E4; } 611 | 48% { fill:#97D3EA; } 612 | 52% { fill:#92D3F4; } 613 | 56% { fill:#95C8DA; } 614 | 60% { fill:#96BDC5; } 615 | 64% { fill:#96B3B2; } 616 | 68% { fill:#96AA9E; } 617 | 72% { fill:#AF866A; } 618 | 76% { fill:#C0633B; } 619 | 80% { fill:#9D5E51; } 620 | 84% { fill:#7B5960; } 621 | 88% { fill:#59546D; } 622 | 92% { fill:#484E64; } 623 | 96% { fill:#37475C; } 624 | 100% { fill:#244154; } 625 | } 626 | 627 | /* Land - layer 2 animation */ 628 | #landscape .layer2 { 629 | fill:#E6E7E8; 630 | -webkit-animation-name: layer2; 631 | } 632 | @-webkit-keyframes layer2{ 633 | 0% { fill:#0F2B46; } 634 | 4% { fill:#1C2D4A; } 635 | 8% { fill:#272E4E; } 636 | 12% { fill:#302F52; } 637 | 16% { fill:#663966; } 638 | 20% { fill:#913776; } 639 | 24% { fill:#D94A93; } 640 | 28% { fill:#BB94AD; } 641 | 32% { fill:#76CCCE; } 642 | 36% { fill:#6BAEC9; } 643 | 40% { fill:#62A7CA; } 644 | 44% { fill:#59A0CB; } 645 | 48% { fill:#5099CC; } 646 | 52% { fill:#4692CF; } 647 | 56% { fill:#4D8FBD; } 648 | 60% { fill:#518CAF; } 649 | 64% { fill:#548AA1; } 650 | 68% { fill:#578793; } 651 | 72% { fill:#7E6768; } 652 | 76% { fill:#8F4244; } 653 | 80% { fill:#74404D; } 654 | 84% { fill:#593D55; } 655 | 88% { fill:#393B5D; } 656 | 92% { fill:#2C3655; } 657 | 96% { fill:#1F304E; } 658 | 100% { fill:#0F2B46; } 659 | } 660 | 661 | /* Land - layer 3 animation */ 662 | #landscape .layer3 { 663 | fill:#D1D3D4; 664 | -webkit-animation-name: layer3; 665 | } 666 | @-webkit-keyframes layer3{ 667 | 0% { fill:#0F2944; } 668 | 4% { fill:#1B2B47; } 669 | 8% { fill:#252C4B; } 670 | 12% { fill:#2E2D4E; } 671 | 16% { fill:#5F3663; } 672 | 20% { fill:#863572; } 673 | 24% { fill:#C8458D; } 674 | 28% { fill:#A48BAB; } 675 | 32% { fill:#68BFC7; } 676 | 36% { fill:#54A4C8; } 677 | 40% { fill:#4F9EC8; } 678 | 44% { fill:#4B98C7; } 679 | 48% { fill:#4691C7; } 680 | 52% { fill:#408BC8; } 681 | 56% { fill:#4688B7; } 682 | 60% { fill:#4984A9; } 683 | 64% { fill:#4C819C; } 684 | 68% { fill:#4E7E8F; } 685 | 72% { fill:#776167; } 686 | 76% { fill:#893E45; } 687 | 80% { fill:#6F3C4C; } 688 | 84% { fill:#543A52; } 689 | 88% { fill:#353758; } 690 | 92% { fill:#2A3351; } 691 | 96% { fill:#1E2E4A; } 692 | 100% { fill:#0F2944; } 693 | } 694 | 695 | /* Land - layer 4 animation */ 696 | #landscape .layer4 { 697 | fill:#BCBEC0; 698 | -webkit-animation-name: layer4; 699 | } 700 | @-webkit-keyframes layer4{ 701 | 0% { fill:#0F2841; } 702 | 4% { fill:#1A2945; } 703 | 8% { fill:#232A48; } 704 | 12% { fill:#2B2A4B; } 705 | 16% { fill:#59335F; } 706 | 20% { fill:#7C336D; } 707 | 24% { fill:#B84089; } 708 | 28% { fill:#9683A5; } 709 | 32% { fill:#57B5C1; } 710 | 36% { fill:#4798BD; } 711 | 40% { fill:#4391BC; } 712 | 44% { fill:#408BBB; } 713 | 48% { fill:#3D85BA; } 714 | 52% { fill:#397FBA; } 715 | 56% { fill:#3E7DAC; } 716 | 60% { fill:#407AA1; } 717 | 64% { fill:#427896; } 718 | 68% { fill:#44768B; } 719 | 72% { fill:#705B66; } 720 | 76% { fill:#823B46; } 721 | 80% { fill:#69394B; } 722 | 84% { fill:#503650; } 723 | 88% { fill:#323454; } 724 | 92% { fill:#27304D; } 725 | 96% { fill:#1C2C47; } 726 | 100% { fill:#0F2841; } 727 | } 728 | 729 | /* Land - layer 5 animation */ 730 | #landscape .layer5 { 731 | fill:#A7A9AC; 732 | -webkit-animation-name: layer5; 733 | } 734 | @-webkit-keyframes layer5{ 735 | 0% { fill:#0E263F; } 736 | 4% { fill:#192742; } 737 | 8% { fill:#212745; } 738 | 12% { fill:#292848; } 739 | 16% { fill:#51305B; } 740 | 20% { fill:#6E3068; } 741 | 24% { fill:#A23B82; } 742 | 28% { fill:#84799F; } 743 | 32% { fill:#44AABC; } 744 | 36% { fill:#3A8DB3; } 745 | 40% { fill:#3887B1; } 746 | 44% { fill:#3680AF; } 747 | 48% { fill:#347AAD; } 748 | 52% { fill:#3273AB; } 749 | 56% { fill:#3672A1; } 750 | 60% { fill:#387198; } 751 | 64% { fill:#396F90; } 752 | 68% { fill:#3A6E87; } 753 | 72% { fill:#695565; } 754 | 76% { fill:#7C3747; } 755 | 80% { fill:#64354A; } 756 | 84% { fill:#4B334D; } 757 | 88% { fill:#2E314F; } 758 | 92% { fill:#252D4A; } 759 | 96% { fill:#1B2A44; } 760 | 100% { fill:#0E263F; } 761 | } 762 | 763 | /* Land - layer 6 animation */ 764 | #landscape .layer6 { 765 | fill:#939598; 766 | -webkit-animation-name: layer6; 767 | } 768 | @-webkit-keyframes layer6{ 769 | 0% { fill:#0E243C; } 770 | 4% { fill:#18253F; } 771 | 8% { fill:#202542; } 772 | 12% { fill:#262544; } 773 | 16% { fill:#482C56; } 774 | 20% { fill:#612D63; } 775 | 24% { fill:#8D357C; } 776 | 28% { fill:#6F719B; } 777 | 32% { fill:#00A1BC; } 778 | 36% { fill:#2583A8; } 779 | 40% { fill:#287CA3; } 780 | 44% { fill:#2A759F; } 781 | 48% { fill:#2D6F9A; } 782 | 52% { fill:#2E6895; } 783 | 56% { fill:#2F6891; } 784 | 60% { fill:#30678D; } 785 | 64% { fill:#306788; } 786 | 68% { fill:#306683; } 787 | 72% { fill:#625064; } 788 | 76% { fill:#753347; } 789 | 80% { fill:#5E3249; } 790 | 84% { fill:#47304A; } 791 | 88% { fill:#2B2E4B; } 792 | 92% { fill:#222A46; } 793 | 96% { fill:#192741; } 794 | 100% { fill:#0E243C; } 795 | } 796 | 797 | /* Land - layer 7 animation */ 798 | #landscape .layer7 { 799 | fill:#808285; 800 | -webkit-animation-name: layer7; 801 | } 802 | @-webkit-keyframes layer7{ 803 | 0% { fill:#102237; } 804 | 4% { fill:#18223A; } 805 | 8% { fill:#1E233D; } 806 | 12% { fill:#242340; } 807 | 16% { fill:#402952; } 808 | 20% { fill:#542A5E; } 809 | 24% { fill:#793177; } 810 | 28% { fill:#5F668F; } 811 | 32% { fill:#0A8FA7; } 812 | 36% { fill:#237595; } 813 | 40% { fill:#256F90; } 814 | 44% { fill:#27698C; } 815 | 48% { fill:#286387; } 816 | 52% { fill:#285D82; } 817 | 56% { fill:#285E82; } 818 | 60% { fill:#285F81; } 819 | 64% { fill:#275F81; } 820 | 68% { fill:#255F7F; } 821 | 72% { fill:#574A63; } 822 | 76% { fill:#683148; } 823 | 80% { fill:#542F48; } 824 | 84% { fill:#3F2D47; } 825 | 88% { fill:#242742; } 826 | 92% { fill:#202841; } 827 | 96% { fill:#19253C; } 828 | 100% { fill:#102237; } 829 | } 830 | 831 | /* Land - layer 8 animation */ 832 | #landscape .layer8 { 833 | fill:#6D6E71; 834 | -webkit-animation-name: layer8; 835 | } 836 | @-webkit-keyframes layer8{ 837 | 0% { fill:#111F31; } 838 | 4% { fill:#172034; } 839 | 8% { fill:#1C2037; } 840 | 12% { fill:#20213B; } 841 | 16% { fill:#37274C; } 842 | 20% { fill:#472759; } 843 | 24% { fill:#662C71; } 844 | 28% { fill:#4F5C83; } 845 | 32% { fill:#118095; } 846 | 36% { fill:#206983; } 847 | 40% { fill:#21637E; } 848 | 44% { fill:#225D7A; } 849 | 48% { fill:#225775; } 850 | 52% { fill:#225270; } 851 | 56% { fill:#235372; } 852 | 60% { fill:#235574; } 853 | 64% { fill:#235675; } 854 | 68% { fill:#235676; } 855 | 72% { fill:#4C445F; } 856 | 76% { fill:#5B2F49; } 857 | 80% { fill:#4A2C47; } 858 | 84% { fill:#382A44; } 859 | 88% { fill:#242742; } 860 | 92% { fill:#1E253D; } 861 | 96% { fill:#182338; } 862 | 100% { fill:#111F31; } 863 | } 864 | 865 | /* Land - layer 9 animation */ 866 | #landscape .layer9 { 867 | fill:#58595B; 868 | -webkit-animation-name: layer9; 869 | } 870 | @-webkit-keyframes layer9{ 871 | 0% { fill:#111C2B; } 872 | 4% { fill:#151D2E; } 873 | 8% { fill:#191E32; } 874 | 12% { fill:#1D1E35; } 875 | 16% { fill:#2F2447; } 876 | 20% { fill:#3A2454; } 877 | 24% { fill:#52296C; } 878 | 28% { fill:#405279; } 879 | 32% { fill:#137185; } 880 | 36% { fill:#1C5C72; } 881 | 40% { fill:#1C576E; } 882 | 44% { fill:#1C5269; } 883 | 48% { fill:#1B4C64; } 884 | 52% { fill:#1A475F; } 885 | 56% { fill:#1C4A63; } 886 | 60% { fill:#1E4B67; } 887 | 64% { fill:#1F4D6A; } 888 | 68% { fill:#204E6D; } 889 | 72% { fill:#413E5A; } 890 | 76% { fill:#4E2D49; } 891 | 80% { fill:#402A45; } 892 | 84% { fill:#312742; } 893 | 88% { fill:#20243E; } 894 | 92% { fill:#1B2238; } 895 | 96% { fill:#171F32; } 896 | 100% { fill:#111C2B; } 897 | } 898 | 899 | /* Land - layer 10 animation */ 900 | #landscape .layer10 { 901 | fill:#414042; 902 | -webkit-animation-name: layer10; 903 | } 904 | @-webkit-keyframes layer10{ 905 | 0% { fill:#101825; } 906 | 4% { fill:#131928; } 907 | 8% { fill:#161A2C; } 908 | 12% { fill:#181B2F; } 909 | 16% { fill:#262141; } 910 | 20% { fill:#2C214F; } 911 | 24% { fill:#3D2567; } 912 | 28% { fill:#30486F; } 913 | 32% { fill:#136476; } 914 | 36% { fill:#165163; } 915 | 40% { fill:#154C5E; } 916 | 44% { fill:#144759; } 917 | 48% { fill:#134254; } 918 | 52% { fill:#113D4F; } 919 | 56% { fill:#154055; } 920 | 60% { fill:#19425A; } 921 | 64% { fill:#1B445F; } 922 | 68% { fill:#1E4564; } 923 | 72% { fill:#363856; } 924 | 76% { fill:#412A49; } 925 | 80% { fill:#352744; } 926 | 84% { fill:#29243F; } 927 | 88% { fill:#1C203A; } 928 | 92% { fill:#191F33; } 929 | 96% { fill:#151C2C; } 930 | 100% { fill:#101825; } 931 | } 932 | 933 | /* Land - layer 11 animation */ 934 | #landscape .layer11 { 935 | fill:#232323; 936 | -webkit-animation-name: layer11; 937 | } 938 | @-webkit-keyframes layer11{ 939 | 0% { fill:#0D141E; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 940 | 4% { fill:#101522; transform: skew(1deg, 0deg) translate3d(-0.5%, 0px, 0px);} 941 | 8% { fill:#121726; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 942 | 12% { fill:#141829; transform: skew(-1deg, 0deg) translate3d(0.5%, 0px, 0px);} 943 | 16% { fill:#1C1E3C; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 944 | 20% { fill:#22214F; transform: skew(1deg, 0deg) translate3d(-0.5%, 0px, 0px);} 945 | 24% { fill:#262262; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 946 | 28% { fill:#1D4065; transform: skew(-1deg, 0deg) translate3d(0.5%, 0px, 0px);} 947 | 32% { fill:#125768; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 948 | 36% { fill:#1E4553; transform: skew(1deg, 0deg) translate3d(-0.5%, 0px, 0px);} 949 | 40% { fill:#1E404E; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 950 | 44% { fill:#1E3B49; transform: skew(-1deg, 0deg) translate3d(0.5%, 0px, 0px);} 951 | 48% { fill:#1D3643; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 952 | 52% { fill:#1C313E; transform: skew(1deg, 0deg) translate3d(-0.5%, 0px, 0px);} 953 | 56% { fill:#1C3344; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 954 | 60% { fill:#1C3449; transform: skew(-1deg, 0deg) translate3d(0.5%, 0px, 0px);} 955 | 64% { fill:#1B344F; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 956 | 68% { fill:#183454; transform: skew(1deg, 0deg) translate3d(-0.5%, 0px, 0px);} 957 | 72% { fill:#242B4A; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 958 | 76% { fill:#2B2241; transform: skew(-1deg, 0deg) translate3d(0.5%, 0px, 0px);} 959 | 80% { fill:#24203C; transform: skew(0deg, 0deg) translate3d(0px, 0px, 0px);} 960 | 84% { fill:#1D1D37; } 961 | 88% { fill:#151A32; } 962 | 92% { fill:#14192C; } 963 | 96% { fill:#111725; } 964 | 100% { fill:#0D141E; } 965 | } 966 | 967 | /* Aspect ratio media queries 968 | ---------------------------------------------- */ 969 | 970 | /* 3/2 and 6/1 -- out of range*/ 971 | @media screen and (min-aspect-ratio: 3/1) and (max-aspect-ratio: 6/1){ 972 | body{background: rgb(31, 60, 80);} 973 | body:before{content:'Aspect ratio out of range - too wide';color: white;text-align: center;width: 100%;height: 100%;display: block;position: absolute;top: 50%;} 974 | #sky, #reflection, #sunMask, #landscape, #bottom, #stag, .controls, .stars, .sunMask, .clouds, .lighting, .vignette, .twinkleWrap,.spriteWrap{display: none;} 975 | } 976 | 977 | /* 14/5 and 3/1 */ 978 | @media screen and (min-aspect-ratio: 14/5) and (max-aspect-ratio: 7/2){ 979 | .twinkles{} 980 | #reflection, #sunMask{height: 42%;} 981 | #landscape{bottom: -3%;} 982 | #bottom{top: 101%;} 983 | #stag{bottom: 3%;} 984 | .sun{top: -570%;} 985 | .twinkles{top: 77%;} 986 | } 987 | /* 5/2 and 14/5 */ 988 | @media screen and (min-aspect-ratio: 5/2) and (max-aspect-ratio: 14/5){ 989 | .twinkles{top: 75%;} 990 | #reflection, #sunMask{} 991 | #landscape{bottom: 1%;} 992 | #bottom{top: 98%;} 993 | #stag{bottom: 7%;} 994 | .sun{top: -532%;} 995 | } 996 | /* 9/4 and 5/2 */ 997 | @media screen and (min-aspect-ratio: 9/4) and (max-aspect-ratio: 5/2){ 998 | .twinkles{top: 75%;} 999 | #reflection, #sunMask{height: 40%;} 1000 | #landscape{bottom: 5%;} 1001 | #bottom{top: 94%;} 1002 | #stag{bottom: 10%;} 1003 | .sun{top: -452%;} 1004 | } 1005 | /* 11/5 and 9/4 */ 1006 | @media screen and (min-aspect-ratio: 11/5) and (max-aspect-ratio: 9/4){ 1007 | .twinkles{} 1008 | #reflection, #sunMask{} 1009 | #landscape{bottom: 6%;} 1010 | #bottom{top: 93%;} 1011 | #stag{ 1012 | bottom: 11%;} 1013 | .sun{top: -410%;} 1014 | } 1015 | /* 13/6 and 11/5 */ 1016 | @media screen and (min-aspect-ratio: 13/6) and (max-aspect-ratio: 11/5){ 1017 | .twinkles{} 1018 | #reflection, #sunMask{height: 37%;} 1019 | #landscape{bottom: 6%;} 1020 | #bottom{top: 93%;} 1021 | #stag{bottom: 11%;} 1022 | .sun{} 1023 | } 1024 | 1025 | /* 15/7 and 13/6 */ 1026 | @media screen and (min-aspect-ratio: 15/7) and (max-aspect-ratio: 13/6){ 1027 | .twinkles{} 1028 | #reflection, #sunMask{height: 31%;} 1029 | #landscape{bottom: 7%;} 1030 | #bottom{top: 92%;} 1031 | #stag{bottom: 12%;} 1032 | .sun{} 1033 | } 1034 | 1035 | /* 2/1 and 15/7 */ 1036 | @media screen and (min-aspect-ratio: 2/1) and (max-aspect-ratio: 15/7){ 1037 | .twinkles{} 1038 | #reflection, #sunMask{height: 31%;} 1039 | #landscape{bottom: 8%;} 1040 | #bottom{top: 91%;} 1041 | #stag{bottom: 12%;} 1042 | .sun{top: -370%;} 1043 | } 1044 | 1045 | @media screen and (min-aspect-ratio: 15/8) and (max-aspect-ratio: 2/1){ 1046 | .twinkles{} 1047 | #reflection, #sunMask{height: 30%;} 1048 | #landscape{} 1049 | #bottom{} 1050 | #stag{bottom: 15%;} 1051 | .sun{} 1052 | } 1053 | 1054 | /* 7/4 and 15/8 */ 1055 | @media screen and (min-aspect-ratio: 7/4) and (max-aspect-ratio: 15/8){ 1056 | .twinkles{top: 71%;} 1057 | #reflection, #sunMask{height: 28%;} 1058 | #landscape{bottom: 13%;} 1059 | #bottom{top: 86%;} 1060 | #stag{bottom: 17%;} 1061 | .sun{top: -300%;} 1062 | } 1063 | /* 11/7 and 7/4 */ 1064 | @media screen and (min-aspect-ratio: 11/7) and (max-aspect-ratio: 7/4){ 1065 | .twinkles{top: 69%;} 1066 | #reflection, #sunMask{height: 24%;} 1067 | #landscape{bottom: 16%;} 1068 | #bottom{top: 83%;} 1069 | #stag{bottom: 20%;} 1070 | .sun{top: -270%;} 1071 | } 1072 | /* 13/9 and 11/7 */ 1073 | @media screen and (min-aspect-ratio: 13/9) and (max-aspect-ratio: 11/7){ 1074 | .twinkles{top: 68%;} 1075 | #reflection, #sunMask{height: 22%;} 1076 | #landscape{bottom: 18%;} 1077 | #bottom{top: 81%;} 1078 | #stag{bottom: 21.6%;} 1079 | .sun{top: -240%;} 1080 | } 1081 | /* 4/3 and 13/9 */ 1082 | @media screen and (min-aspect-ratio: 4/3) and (max-aspect-ratio: 13/9){ 1083 | .twinkles{top: 66%;} 1084 | #reflection, #sunMask{height: 19%;} 1085 | #landscape{bottom: 22%;} 1086 | #bottom{top: 77%;} 1087 | #stag{bottom: 25%;} 1088 | .sun{top: -230%;} 1089 | } 1090 | /* 8/7 and 4/3 */ 1091 | @media screen and (min-aspect-ratio: 8/7) and (max-aspect-ratio: 4/3){ 1092 | .twinkles{top: 65%;} 1093 | #reflection, #sunMask{height: 18%;} 1094 | #landscape{bottom: 23%;} 1095 | #bottom{top: 76%;} 1096 | #stag{bottom: 25.3%;} 1097 | .sun{top: -180%;} 1098 | } 1099 | /* 14/15 and 8/7 */ 1100 | @media screen and (min-aspect-ratio: 14/15) and (max-aspect-ratio: 8/7){ 1101 | .twinkles{top: 63%;width: 3%;} 1102 | #reflection, #sunMask{height: 17%;} 1103 | #landscape{bottom: 26%;} 1104 | #bottom{top: 73.8%;} 1105 | #stag{bottom: 28.3%;} 1106 | .sun{top: -140%;} 1107 | } 1108 | /* 5/6 and 14/15 */ 1109 | @media screen and (min-aspect-ratio: 5/6) and (max-aspect-ratio: 14/15){ 1110 | .twinkles{top: 63%; width: 3%;} 1111 | #reflection, #sunMask{height: 13%;} 1112 | #landscape{bottom: 28%;} 1113 | #bottom{top: 71.5%;} 1114 | #stag{bottom: 30%;} 1115 | .sun{top: -110%;} 1116 | } 1117 | /* 7/10 and 5/6 */ 1118 | @media screen and (min-aspect-ratio: 7/10) and (max-aspect-ratio: 5/6){ 1119 | .twinkles{top: 62%; width: 3%;} 1120 | #reflection, #sunMask{height: 11%;} 1121 | #landscape{bottom: 30%;} 1122 | #bottom{top: 69.6%;} 1123 | #stag{bottom: 31.8%;} 1124 | .sun{top: -70%;} 1125 | } 1126 | /* 5/9 and 7/10 */ 1127 | @media screen and (min-aspect-ratio: 5/9) and (max-aspect-ratio: 7/10){ 1128 | .twinkles{top: 62%; width: 3%;} 1129 | #reflection, #sunMask{height: 8%;} 1130 | #landscape{bottom: 32%;} 1131 | #bottom{top: 67.5%;} 1132 | #stag{bottom: 33.5%;} 1133 | .sun{top: -55%;} 1134 | } 1135 | 1136 | /* 1/10 and 5/9 --- out of range*/ 1137 | @media screen and (min-aspect-ratio: 1/10) and (max-aspect-ratio: 5/9){ 1138 | body{background: rgb(31, 60, 80);} 1139 | body:before{content:'Aspect ratio out of range - too narrow';color: white;text-align: center;width: 100%;height: 100%;display: block;position: absolute;top: 50%;} 1140 | #sky, #reflection, #sunMask, #landscape, #bottom, #stag, .controls, .stars, .sunMask, .clouds, .lighting, .vignette, .twinkleWrap,.spriteWrap{display: none;} 1141 | } 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | -------------------------------------------------------------------------------- /html/landscape-animation-experiment/js/index.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function ($) { 2 | 3 | // noise grain toggle 4 | $('a.noiseTest').on('click', function (event) { 5 | event.preventDefault(); 6 | $('.noise').toggleClass('active'); 7 | $(this).toggleClass('active'); 8 | }); 9 | 10 | }); 11 | 12 | /* Credit to Collin Henderson @ AstralApp.com */ 13 | 14 | (function() { 15 | var WIDTH, HEIGHT, canvas, con, g; 16 | var pxs = []; 17 | var rint = 50; 18 | 19 | $.fn.sprites = function () { 20 | this.append($('')); 21 | setup(this); 22 | } 23 | 24 | function setup (container) { 25 | var windowSize = function() { 26 | WIDTH = container.innerWidth(); 27 | HEIGHT = container.innerHeight(); 28 | canvas = container.find('#sprites'); 29 | canvas.attr('width', WIDTH).attr('height', HEIGHT); 30 | }; 31 | 32 | windowSize(); 33 | 34 | $(window).resize(function() { 35 | windowSize(); 36 | }); 37 | 38 | con = canvas[0].getContext('2d'); 39 | 40 | for (var i = 0; i < 100; i++) { 41 | pxs[i] = new Circle(); 42 | pxs[i].reset(); 43 | } 44 | 45 | requestAnimationFrame(draw); 46 | } 47 | 48 | function draw () { 49 | con.clearRect(0, 0, WIDTH, HEIGHT); 50 | con.globalCompositeOperation = "lighter"; 51 | 52 | for (var i = 0; i < pxs.length; i++) { 53 | pxs[i].fade(); 54 | pxs[i].move(); 55 | pxs[i].draw(); 56 | } 57 | 58 | requestAnimationFrame(draw); 59 | } 60 | 61 | function Circle() { 62 | this.s = { 63 | ttl: 15000, 64 | xmax: 5, 65 | ymax: 2, 66 | rmax: 7, 67 | rt: 1, 68 | xdef: 960, 69 | ydef: 540, 70 | xdrift: 4, 71 | ydrift: 4, 72 | random: true, 73 | blink: true 74 | }; 75 | 76 | this.reset = function() { 77 | this.x = (this.s.random ? WIDTH * Math.random() : this.s.xdef); 78 | this.y = (this.s.random ? HEIGHT * Math.random() : this.s.ydef); 79 | this.r = ((this.s.rmax - 1) * Math.random()) + 1; 80 | 81 | this.dx = (Math.random() * this.s.xmax) * (Math.random() < 0.5 ? -1 : 1); 82 | this.dy = (Math.random() * this.s.ymax) * (Math.random() < 0.5 ? -1 : 1); 83 | 84 | this.hl = (this.s.ttl / rint) * (this.r / this.s.rmax); 85 | this.rt = Math.random() * this.hl; 86 | 87 | this.stop = Math.random() * 0.2 + 0.4; 88 | 89 | this.s.rt = Math.random() + 1; 90 | this.s.xdrift *= Math.random() * (Math.random() < 0.5 ? -1 : 1); 91 | this.s.ydrift *= Math.random() * (Math.random() < 0.5 ? -1 : 1); 92 | }; 93 | 94 | this.fade = function() { 95 | this.rt += this.s.rt; 96 | }; 97 | 98 | this.draw = function() { 99 | var newo, cr; 100 | 101 | if (this.s.blink && (this.rt <= 0 || this.rt >= this.hl)) { 102 | this.s.rt = this.s.rt * -1; 103 | } 104 | else if (this.rt >= this.hl) { 105 | this.reset(); 106 | } 107 | 108 | newo = 1 - (this.rt / this.hl); 109 | 110 | con.beginPath(); 111 | con.arc(this.x, this.y, this.r, 0, Math.PI * 2, true); 112 | con.closePath(); 113 | 114 | cr = this.r * newo; 115 | 116 | g = con.createRadialGradient(this.x, this.y, 0, this.x, this.y, (cr <= 0 ? 1 : cr)); 117 | g.addColorStop(0.0, 'rgba(193,254,254,' + newo + ')'); 118 | g.addColorStop(this.stop, 'rgba(193,254,254,' + (newo * 0.2) + ')'); 119 | g.addColorStop(1.0, 'rgba(193,254,254,0)'); 120 | 121 | con.fillStyle = g; 122 | con.fill(); 123 | }; 124 | 125 | this.move = function() { 126 | this.x += (this.rt / this.hl) * this.dx; 127 | this.y += (this.rt / this.hl) * this.dy; 128 | if (this.x > WIDTH || this.x < 0) this.dx *= -1; 129 | if (this.y > HEIGHT || this.y < 0) this.dy *= -1; 130 | }; 131 | 132 | this.getX = function() { 133 | return this.x; 134 | }; 135 | 136 | this.getY = function() { 137 | return this.y; 138 | }; 139 | }; 140 | })(); 141 | 142 | $('.spriteWrap').sprites(); -------------------------------------------------------------------------------- /html/landscape-animation-experiment/license.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | -------------------------------------------------------------------------------- /jetbrains.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mritd/dockerfile/6686c3423f3939e3f4a1fbe6f02c03a954dd6cb9/jetbrains.jpeg -------------------------------------------------------------------------------- /jira/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM atlassian/jira-software:8.10.0 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | ENV AGENT_PATH /opt/atlassian-agent.jar 9 | 10 | COPY atlassian-agent.jar ${AGENT_PATH} 11 | COPY hijack.sh /hijack.sh 12 | 13 | RUN set -x \ 14 | && export DEBIAN_FRONTEND=noninteractive \ 15 | && apt update \ 16 | && apt upgrade -y \ 17 | && apt install tzdata -y \ 18 | && chown ${RUN_USER}:${RUN_GROUP} ${AGENT_PATH} \ 19 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 20 | && echo ${TZ} > /etc/timezone \ 21 | && dpkg-reconfigure --frontend noninteractive tzdata \ 22 | && apt autoremove -y \ 23 | && apt autoclean -y 24 | 25 | CMD ["/hijack.sh"] 26 | -------------------------------------------------------------------------------- /jira/atlassian-agent.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mritd/dockerfile/6686c3423f3939e3f4a1fbe6f02c03a954dd6cb9/jira/atlassian-agent.jar -------------------------------------------------------------------------------- /jira/hijack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export JAVA_OPTS="${JAVA_OPTS} -javaagent:${AGENT_PATH}" 4 | 5 | /entrypoint.py 6 | -------------------------------------------------------------------------------- /mattermost/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.12 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | ENV MATTERMOST_VERSION 5.25.2 9 | ENV MATTERMOST_HOME /mattermost 10 | ENV MATTERMOST_DATA_DIR /data 11 | ENV MATTERMOST_DOWNLOAD_URL https://releases.mattermost.com/${MATTERMOST_VERSION}/mattermost-team-${MATTERMOST_VERSION}-linux-amd64.tar.gz 12 | 13 | ENV PATH ${PATH}:${MATTERMOST_HOME}/bin 14 | 15 | RUN set -ex \ 16 | && apk upgrade \ 17 | && apk add bash tzdata curl ca-certificates \ 18 | libc6-compat libffi-dev mailcap \ 19 | && curl -s ${MATTERMOST_DOWNLOAD_URL} | tar -xz \ 20 | && ln -sf ${MATTERMOST_DATA_DIR} ${MATTERMOST_HOME}/data \ 21 | && ln -sf ${MATTERMOST_DATA_DIR}/logs ${MATTERMOST_HOME}/logs \ 22 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 23 | && echo ${TZ} > /etc/timezone \ 24 | && rm -rf ${MATTERMOST_HOME}/bin/platform \ 25 | /var/cache/apk/* 26 | 27 | WORKDIR ${MATTERMOST_HOME} 28 | 29 | VOLUME ${MATTERMOST_DATA_DIR} 30 | 31 | EXPOSE 8065 32 | 33 | COPY entrypoint.sh / 34 | 35 | ENTRYPOINT ["/entrypoint.sh"] 36 | 37 | CMD ["mattermost","server"] 38 | -------------------------------------------------------------------------------- /mattermost/README.md: -------------------------------------------------------------------------------- 1 | ## Mattermost 2 | 3 | [![](https://images.microbadger.com/badges/image/mritd/mattermost.svg)](https://microbadger.com/images/mritd/mattermost "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/mritd/mattermost.svg)](https://microbadger.com/images/mritd/mattermost "Get your own version badge on microbadger.com") 4 | 5 | > Mattermost 是一个开源 IM 工具,目前个人主要应用于自动化部署,如通过 Hubot 对接 Kuberntes 实现机器人部署、GitLab-CI 部署通知、Sentry 错误告警推送等 6 | 7 | 本镜像基于 Alpine 制作,未集成数据库等,启动测试 docker-compose 如下 8 | 9 | ``` sh 10 | version: '2' 11 | services: 12 | mattermost: 13 | image: mritd/mattermost:3.10.0 14 | restart: always 15 | volumes: 16 | - ./etc/mattermost/config.json:/usr/local/mattermost/config/config.json 17 | links: 18 | - mysql 19 | ports: 20 | - 8065:8065 21 | mysql: 22 | image: mysql:5.7.17 23 | restart: always 24 | volumes: 25 | - ./data/mysql:/var/lib/mysql 26 | - ./init/init.sql:/docker-entrypoint-initdb.d/init.sql 27 | environment: 28 | - MYSQL_ROOT_PASSWORD 29 | ``` 30 | 31 | **完整 docker-compose 配置请参考 [mritd/docker-compose](https://github.com/mritd/docker-compose/tree/master/mattermost)** 32 | 33 | -------------------------------------------------------------------------------- /mattermost/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | for dir in /data/data /data/logs /data/config /data/plugins /data/client-plugins; do 4 | if [ ! -d "${dir}" ]; then 5 | mkdir -p ${dir} 6 | fi 7 | done 8 | 9 | exec $@ 10 | -------------------------------------------------------------------------------- /metricbeat/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | ARG TZ="Asia/Shanghai" 4 | 5 | ENV TZ ${TZ} 6 | ENV METRICBEAT_VERSION 6.4.0 7 | ENV METRICBEAT_HOME /usr/share/metricbeat 8 | ENV METRICBEAT_DOWNLOAD_URL https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-${METRICBEAT_VERSION}-linux-x86_64.tar.gz 9 | 10 | RUN apk upgrade \ 11 | && apk add bash tzdata libc6-compat \ 12 | && apk add --virtual=build-dependencies wget ca-certificates \ 13 | && wget -q ${METRICBEAT_DOWNLOAD_URL} \ 14 | && mkdir -p ${METRICBEAT_HOME}/data ${METRICBEAT_HOME}/logs \ 15 | && tar -zxf metricbeat-${METRICBEAT_VERSION}-linux-x86_64.tar.gz \ 16 | -C ${METRICBEAT_HOME} --strip-components 1 \ 17 | && rm -f metricbeat-${METRICBEAT_VERSION}-linux-x86_64.tar.gz \ 18 | ${METRICBEAT_HOME}/.build_hash.txt \ 19 | ${METRICBEAT_HOME}/NOTICE \ 20 | ${METRICBEAT_HOME}/README.md \ 21 | && ln -s ${METRICBEAT_HOME}/metricbeat /usr/bin/metricbeat \ 22 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 23 | && echo ${TZ} > /etc/timezone \ 24 | && apk del build-dependencies \ 25 | && rm -rf /var/cache/apk/* 26 | 27 | COPY docker-entrypoint.sh /entrypoint.sh 28 | 29 | VOLUME /etc/metricbeat 30 | 31 | ENTRYPOINT ["/entrypoint.sh"] 32 | 33 | CMD ["-e","-c","/etc/metricbeat.yaml"] 34 | -------------------------------------------------------------------------------- /metricbeat/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Check if the the user has invoked the image with flags. 6 | # eg. "metricbeat -c metricbeat.yml" 7 | if [[ -z $1 ]] || [[ ${1:0:1} == '-' ]] ; then 8 | exec metricbeat "$@" 9 | else 10 | # They may be looking for a Beat subcommand, like "metricbeat setup". 11 | subcommands=$(metricbeat help \ 12 | | awk 'BEGIN {RS=""; FS="\n"} /Available Commands:/' \ 13 | | awk '/^\s+/ {print $1}') 14 | 15 | # If we _did_ get a subcommand, pass it to metricbeat. 16 | for subcommand in $subcommands; do 17 | if [[ $1 == $subcommand ]]; then 18 | exec metricbeat "$@" 19 | fi 20 | done 21 | fi 22 | 23 | # If niether of those worked, then they have specified the binary they want, so 24 | # just do exactly as they say. 25 | exec "$@" 26 | -------------------------------------------------------------------------------- /owncloud/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.12 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ='Asia/Shanghai' 6 | 7 | ENV TZ ${TZ} 8 | ENV OWNCLOUD_VERSION 10.4.1 9 | ENV OWNCLOUD_GPGKEY E3036906AD9F30807351FAC32D5D5E97F6978A26 10 | ENV OWNCLOUD_DOWNLOAD_URL https://download.owncloud.org/community/owncloud-${OWNCLOUD_VERSION}.tar.bz2 11 | ENV OWNCLOUD_DOWNLOAD_ASC_URL https://download.owncloud.org/community/owncloud-${OWNCLOUD_VERSION}.tar.bz2.asc 12 | 13 | RUN apk upgrade --update \ 14 | && apk add bash tzdata gnupg openssl tar curl ca-certificates \ 15 | php7-fpm php7-exif php7-gd php7-intl php7-ldap \ 16 | php7-mbstring php7-mcrypt php7-opcache php7-pdo \ 17 | php7-pdo_mysql php7-pdo_pgsql php7-pgsql php7-zip \ 18 | php7-apcu php7-memcached php7-redis \ 19 | && curl -fsSL -o owncloud.tar.bz2 ${OWNCLOUD_DOWNLOAD_URL} \ 20 | && curl -fsSL -o owncloud.tar.bz2.asc ${OWNCLOUD_DOWNLOAD_ASC_URL} \ 21 | && export GNUPGHOME="$(mktemp -d)" \ 22 | && gpg --keyserver pgp.mit.edu --recv-keys ${OWNCLOUD_GPGKEY} \ 23 | && gpg --batch --verify owncloud.tar.bz2.asc owncloud.tar.bz2 \ 24 | && mkdir /usr/src \ 25 | && tar -xjf owncloud.tar.bz2 -C /usr/src \ 26 | && addgroup -g 82 -S www-data \ 27 | && adduser -u 82 -D -S -G www-data www-data \ 28 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 29 | && echo "${TZ}" > /etc/timezone \ 30 | && rm -rf ${GNUPGHOME} \ 31 | owncloud.tar.bz2 \ 32 | owncloud.tar.bz2.asc \ 33 | /var/cache/apk/* 34 | 35 | VOLUME /var/www/html 36 | 37 | WORKDIR /var/www/html 38 | 39 | COPY opcache-recommended.ini /usr/local/etc/php/conf.d 40 | 41 | COPY docker-entrypoint.sh /usr/local/bin 42 | 43 | ENTRYPOINT ["docker-entrypoint.sh"] 44 | 45 | CMD ["php-fpm7"] 46 | -------------------------------------------------------------------------------- /owncloud/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ ! -e '/var/www/html/version.php' ]; then 5 | tar cf - --one-file-system -C /usr/src/owncloud . | tar xf - 6 | chown -R www-data /var/www/html 7 | fi 8 | 9 | exec "$@" 10 | -------------------------------------------------------------------------------- /owncloud/opcache-recommended.ini: -------------------------------------------------------------------------------- 1 | opcache.memory_consumption=128 2 | opcache.interned_strings_buffer=8 3 | opcache.max_accelerated_files=4000 4 | opcache.revalidate_freq=60 5 | opcache.fast_shutdown=1 6 | opcache.enable_cli=1 7 | -------------------------------------------------------------------------------- /privoxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.12 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | RUN apk upgrade --update \ 10 | && apk add bash tzdata privoxy \ 11 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 12 | && echo ${TZ} > /etc/timezone \ 13 | && rm -rf /var/cache/apk/* 14 | 15 | CMD ["privoxy","--no-daemon","/etc/privoxy/config"] 16 | -------------------------------------------------------------------------------- /puppeteer-base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:9.3-slim 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | RUN apt-get update \ 10 | && apt-get install -y --force-yes --no-install-recommends \ 11 | gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 \ 12 | libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ 13 | libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ 14 | libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ 15 | ca-certificates fonts-liberation libappindicator1 libnss3 xdg-utils ttf-wqy-zenhei fonts-wqy-microhei \ 16 | && apt-get autoclean 17 | 18 | CMD ["/bin/bash"] 19 | -------------------------------------------------------------------------------- /rssbot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.12 2 | 3 | ARG TZ="Asia/Shanghai" 4 | 5 | ENV TZ ${TZ} 6 | 7 | ENV VERSION 2.0.0-alpha.7 8 | ENV DOWNLOAD_URL https://github.com/iovxw/rssbot/releases/download/v${VERSION}/rssbot-en-amd64-linux 9 | ENV MIN_INTERVAL 300 10 | ENV MAX_INTERVAL 43200 11 | 12 | ADD ${DOWNLOAD_URL} /usr/local/bin/rssbot 13 | 14 | RUN set -ex \ 15 | && apk add tzdata ca-certificates \ 16 | && chmod +x /usr/local/bin/rssbot \ 17 | && rssbot -V \ 18 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 19 | && echo ${TZ} > /etc/timezone \ 20 | && rm -rf /var/cache/apk/* 21 | 22 | VOLUME /data 23 | 24 | CMD ["sh", "-c", "rssbot --database /data/data.json --min-interval ${MIN_INTERVAL} --max-interval ${MAX_INTERVAL} ${TELEGRAM_BOT_TOKEN}"] 25 | -------------------------------------------------------------------------------- /shadowsocks/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.13 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ='Asia/Shanghai' 6 | 7 | ENV TZ ${TZ} 8 | ENV SS_LIBEV_VERSION v3.3.5 9 | ENV KCP_VERSION 20210103 10 | ENV V2RAY_PLUGIN_VERSION v1.3.1 11 | ENV SS_DOWNLOAD_URL https://github.com/shadowsocks/shadowsocks-libev.git 12 | ENV KCP_DOWNLOAD_URL https://github.com/xtaci/kcptun/releases/download/v${KCP_VERSION}/kcptun-linux-amd64-${KCP_VERSION}.tar.gz 13 | ENV PLUGIN_OBFS_DOWNLOAD_URL https://github.com/shadowsocks/simple-obfs.git 14 | ENV PLUGIN_V2RAY_DOWNLOAD_URL https://github.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_PLUGIN_VERSION}/v2ray-plugin-linux-amd64-${V2RAY_PLUGIN_VERSION}.tar.gz 15 | #ENV LINUX_HEADERS_DOWNLOAD_URL=http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/linux-headers-4.4.6-r2.apk 16 | 17 | RUN apk upgrade \ 18 | && apk add bash tzdata rng-tools runit \ 19 | && apk add --virtual .build-deps \ 20 | autoconf \ 21 | automake \ 22 | build-base \ 23 | curl \ 24 | linux-headers \ 25 | c-ares-dev \ 26 | libev-dev \ 27 | libtool \ 28 | libcap \ 29 | libsodium-dev \ 30 | mbedtls-dev \ 31 | pcre-dev \ 32 | tar \ 33 | git \ 34 | && git clone ${SS_DOWNLOAD_URL} \ 35 | && (cd shadowsocks-libev \ 36 | && git checkout tags/${SS_LIBEV_VERSION} -b ${SS_LIBEV_VERSION} \ 37 | && git submodule update --init --recursive \ 38 | && ./autogen.sh \ 39 | && ./configure --prefix=/usr --disable-documentation \ 40 | && make install) \ 41 | && git clone ${PLUGIN_OBFS_DOWNLOAD_URL} \ 42 | && (cd simple-obfs \ 43 | && git submodule update --init --recursive \ 44 | && ./autogen.sh \ 45 | && ./configure --disable-documentation \ 46 | && make install) \ 47 | && curl -o v2ray_plugin.tar.gz -sSL ${PLUGIN_V2RAY_DOWNLOAD_URL} \ 48 | && tar -zxf v2ray_plugin.tar.gz \ 49 | && mv v2ray-plugin_linux_amd64 /usr/bin/v2ray-plugin \ 50 | && curl -sSLO ${KCP_DOWNLOAD_URL} \ 51 | && tar -zxf kcptun-linux-amd64-${KCP_VERSION}.tar.gz \ 52 | && mv server_linux_amd64 /usr/bin/kcpserver \ 53 | && mv client_linux_amd64 /usr/bin/kcpclient \ 54 | && for binPath in `ls /usr/bin/ss-* /usr/local/bin/obfs-* /usr/bin/kcp* /usr/bin/v2ray*`; do \ 55 | setcap CAP_NET_BIND_SERVICE=+eip $binPath; \ 56 | done \ 57 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 58 | && echo ${TZ} > /etc/timezone \ 59 | && adduser -h /tmp -s /sbin/nologin -S -D -H shadowsocks \ 60 | && adduser -h /tmp -s /sbin/nologin -S -D -H kcptun \ 61 | && apk del .build-deps \ 62 | && apk add --no-cache \ 63 | $(scanelf --needed --nobanner /usr/bin/ss-* /usr/local/bin/obfs-* \ 64 | | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ 65 | | sort -u) \ 66 | && rm -rf /linux-headers-4.4.6-r2.apk \ 67 | kcptun-linux-amd64-${KCP_VERSION}.tar.gz \ 68 | shadowsocks-libev \ 69 | simple-obfs \ 70 | v2ray_plugin.tar.gz \ 71 | /etc/service \ 72 | /var/cache/apk/* 73 | 74 | SHELL ["/bin/bash"] 75 | 76 | COPY runit /etc/service 77 | COPY entrypoint.sh /entrypoint.sh 78 | 79 | ENTRYPOINT ["/entrypoint.sh"] 80 | -------------------------------------------------------------------------------- /shadowsocks/README.md: -------------------------------------------------------------------------------- 1 | ## shadowsocks 2 | 3 | ![](https://img.shields.io/docker/stars/mritd/shadowsocks.svg) ![](https://img.shields.io/docker/pulls/mritd/shadowsocks.svg) ![](https://img.shields.io/microbadger/image-size/mritd/shadowsocks.svg) ![](https://img.shields.io/microbadger/layers/mritd/shadowsocks.svg) 4 | 5 | - **shadowsocks-libev 版本: 3.3.5** 6 | - **kcptun 版本: 20201126** 7 | 8 | **注意: 由于 Docker Hub 自动构建功能最近出现的 Bug 比较多,构建队列缓慢;部分镜像(包含本镜像)可能会在采用本地 Build 然后直接 push 到远程仓库的方式构建;如有安全疑虑,可自行使用本 Dockerfile 构建** 9 | 10 | ### 打开姿势 11 | 12 | ``` sh 13 | docker run -dt --name ss -p 6443:6443 mritd/shadowsocks -s "-s 0.0.0.0 -p 6443 -m chacha20-ietf-poly1305 -k test123" 14 | ``` 15 | 16 | ### 支持选项 17 | 18 | - `-m` : 指定 shadowsocks 命令,默认为 `ss-server` 19 | - `-s` : shadowsocks-libev 参数字符串 20 | - `-x` : 开启 kcptun 支持 21 | - `-e` : 指定 kcptun 命令,默认为 `kcpserver` 22 | - `-k` : kcptun 参数字符串 23 | 24 | ### 选项描述 25 | 26 | - `-m` : 参数后指定一个 shadowsocks 命令,如 ss-local,不写默认为 ss-server;该参数用于 shadowsocks 在客户端和服务端工作模式间切换,可选项如下: `ss-local`、`ss-manager`、`ss-nat`、`ss-redir`、`ss-server`、`ss-tunnel` 27 | - `-s` : 参数后指定一个 shadowsocks-libev 的参数字符串,所有参数将被拼接到 `ss-server` 后 28 | - `-x` : 指定该参数后才会开启 kcptun 支持,否则将默认禁用 kcptun 29 | - `-e` : 参数后指定一个 kcptun 命令,如 kcpclient,不写默认为 kcpserver;该参数用于 kcptun 在客户端和服务端工作模式间切换,可选项如下: `kcpserver`、`kcpclient` 30 | - `-k` : 参数后指定一个 kcptun 的参数字符串,所有参数将被拼接到 `kcptun` 后 31 | 32 | ### 命令示例 33 | 34 | **Server 端** 35 | 36 | ``` sh 37 | docker run -dt --name ssserver -p 6443:6443 -p 6500:6500/udp mritd/shadowsocks -m "ss-server" -s "-s 0.0.0.0 -p 6443 -m chacha20-ietf-poly1305 -k test123" -x -e "kcpserver" -k "-t 127.0.0.1:6443 -l :6500 -mode fast2" 38 | ``` 39 | 40 | **以上命令相当于执行了** 41 | 42 | ``` sh 43 | ss-server -s 0.0.0.0 -p 6443 -m chacha20-ietf-poly1305 -k test123 44 | kcpserver -t 127.0.0.1:6443 -l :6500 -mode fast2 45 | ``` 46 | 47 | **Client 端** 48 | 49 | ``` sh 50 | docker run -dt --name ssclient -p 1080:1080 mritd/shadowsocks -m "ss-local" -s "-s 127.0.0.1 -p 6500 -b 0.0.0.0 -l 1080 -m chacha20-ietf-poly1305 -k test123" -x -e "kcpclient" -k "-r SSSERVER_IP:6500 -l :6500 -mode fast2" 51 | ``` 52 | 53 | **以上命令相当于执行了** 54 | 55 | ``` sh 56 | ss-local -s 127.0.0.1 -p 6500 -b 0.0.0.0 -l 1080 -m chacha20-ietf-poly1305 -k test123 57 | kcpclient -r SSSERVER_IP:6500 -l :6500 -mode fast2 58 | ``` 59 | 60 | **关于 shadowsocks-libev 和 kcptun 都支持哪些参数请自行查阅官方文档,本镜像只做一个拼接** 61 | 62 | **注意:kcptun 映射端口为 udp 模式(`6500:6500/udp`),不写默认 tcp;shadowsocks 请监听 0.0.0.0** 63 | 64 | 65 | ### 环境变量支持 66 | 67 | 68 | |环境变量|作用|取值| 69 | |-------|---|---| 70 | |SS_MODULE|shadowsocks 启动命令| `ss-local`、`ss-manager`、`ss-nat`、`ss-redir`、`ss-server`、`ss-tunnel`| 71 | |SS_CONFIG|shadowsocks-libev 参数字符串|所有字符串内内容应当为 shadowsocks-libev 支持的选项参数| 72 | |KCP_FLAG|是否开启 kcptun 支持|可选参数为 true 和 false,默认为 fasle 禁用 kcptun| 73 | |KCP_MODULE|kcptun 启动命令| `kcpserver`、`kcpclient`| 74 | |KCP_CONFIG|kcptun 参数字符串|所有字符串内内容应当为 kcptun 支持的选项参数| 75 | 76 | 77 | 使用时可指定环境变量,如下 78 | 79 | ``` sh 80 | docker run -dt --name ss -p 6443:6443 -p 6500:6500/udp -e SS_CONFIG="-s 0.0.0.0 -p 6443 -m chacha20-ietf-poly1305 -k test123" -e KCP_MODULE="kcpserver" -e KCP_CONFIG="-t 127.0.0.1:6443 -l :6500 -mode fast2" -e KCP_FLAG="true" mritd/shadowsocks 81 | ``` 82 | 83 | ### 容器平台说明 84 | 85 | **各大免费容器平台都已经对代理工具做了对应封锁,一是为了某些不可描述的原因,二是为了防止被利用称为 DDOS 工具等;基于种种原因,公共免费容器平台问题将不予回复** 86 | 87 | ### GCE 随机数生成错误 88 | 89 | 如果在 GCE 上使用本镜像,在特殊情况下可能会出现 `This system doesn't provide enough entropy to quickly generate high-quality random numbers.` 错误; 90 | 这种情况是由于宿主机没有能提供足够的熵来生成随机数导致,修复办法可以考虑增加 `--device /dev/urandom:/dev/urandom` 选项来使用 `/dev/urandom` 来生成,不过并不算推荐此种方式 91 | 92 | ### 更新日志 93 | 94 | - 2016-10-12 基于 shadowsocks 2.9.0 版本 95 | 96 | 基于 shadowsocks 2.9.0 版本打包 docker image 97 | 98 | - 2016-10-13 增加 kcptun 支持 99 | 100 | 增加 kcptun 的支持,使用 `-x` 可关闭 101 | 102 | - 2016-10-14 增加 环境变量支持 103 | 104 | 增加 默认读取环境变量策略,可通过环境变量指定 shadowsocks 相关设置 105 | 106 | - 2016-11-01 升级 kcptun,增加 kcptun 自定义配置选项(-c 或 环境变量) 107 | 108 | 增加了 `-c` 参数和环境变量 `KCPTUN_CONFIG`,用于在不挂载文件的情况下重写 kcptun 的配置 109 | 110 | - 2016-11-07 chacha20 加密支持 111 | 112 | 增加了 libsodium 库,用于支持 chacha20 加密算法(感谢 Lihang Chen 提出),删除了 wget 进一步精简镜像体积 113 | 114 | - 2016-11-30 更新 kcptun 版本 115 | 116 | 更新 kcptun 版本到 20161118,修正样例命令中 kcptun 端口号使用 tcp 问题(应使用 udp),感谢 Zheart 提出 117 | 118 | - 2016-12-19 更新 kcptun 到 20161202 119 | 120 | 更新 kcptun 版本到 20161202,完善 README 中 kcptun 说明 121 | 122 | - 2016-12-30 更新 kcptun 到 20161222 123 | 124 | 更新 kcptun 版本到 20161222,更新基础镜像 alpine 到 3.5 125 | 126 | - 2017-01-20 升级 kcptun 到 20170117 127 | 128 | 更新 kcptun 到 20170117,kcptun 新版本 ack 结构中更准确的RTT估算,锁优化,更平滑的rtt计算jitter, 129 | 建议更新;同时 20170120 处于 Pre-release 暂不更新;**最近比较忙,可能 kcptun 配置已经有更新,具体 130 | 请参考 kcptun 官网及 [Github](https://github.com/xtaci/kcptun)** 131 | 132 | - 2017-01-25 升级 kcptun 到 20171222 133 | 134 | 更新 kcptun 到 2017...... 别的我忘了...... 135 | 136 | - 2017-02-08 升级 kcptun 到 20170120 137 | 138 | 更新 kcptun 到 20170120,**下个版本准备切换到 shadowsocks-libev 3.0,目前 3.0 还未正式发布,观望中!** 139 | 140 | - 2017-02-25 切换到 shadowsocks-libev 141 | 142 | 切换到 shadowsocks-libev 3.0 版本,同时更新 kcptun 和参数设定 143 | 144 | - 2017-03-07 升级 kcptun 到 20170303 145 | 146 | 更新 kcptun 到 20170303 147 | 148 | - 2017-03-09 升级 kcptun 到 20170308 149 | 150 | 更新 kcptun 到 20170308 151 | 152 | - 2017-03-17 升级 kcptun 和 shadowsocks-libev 153 | 154 | 升级 shadowsocks-libev 到 3.0.4 版本,支持 `TCP Fast Open in ss-redir`、`TOS/DESCP in 155 | ss-redir` 和细化 MPTCP;升级 kcptun 到 315 打假版本 `(:` 156 | 157 | - 2017-03-21 增加多命令支持 158 | 159 | 新增 `-m` 参数用于指定使用那个 shadowsocks 命令,如果作为客户端使用 `-m ss-local`, 160 | 不写的情况下默认为服务端命令,即 `ss-server` 161 | 162 | - 2017-03-22 Bug 修复 163 | 164 | 修复增加 `-m` 参数后 SS_CONFIG 变量为空导致启动失败问题 165 | 166 | - 2017-03-27 例行升级 167 | 168 | 升级 shadowsocks-libev 到 3.0.5、kcptun 到 20170322;kcptun 该版本主要做了 CPU 优化 169 | 170 | - 2017-04-01 例行升级 171 | 172 | 升级 kcptun 到 20170329 173 | 174 | - 2017-04-27 例行升级 175 | 176 | 升级 shadoscoks-libev 到 3.0.6 177 | 178 | - 2017-05-31 例行升级 179 | 180 | 升级 kcptun 到 20150525 181 | 182 | - 2017-06-28 例行升级 183 | 184 | 升级 shadowsocks 到 3.0.7 185 | 186 | - 2017-07-28 例行升级 187 | 188 | 升级 shadowsocks 到 3.0.8 189 | 190 | - 2017-08-09 obfs 支持 191 | 192 | 添加对 simple-obfs 支持 193 | 194 | - 2017-08-23 kcptun client 支持 195 | 196 | 增加镜像对 kcptun client 支持 197 | 198 | - 2017-11-38 例行升级 199 | 200 | 升级 shadowsocks-libev 到 3.1.0,升级 kcptun 到 20170904 201 | 202 | - 2017-10-10 升级 kcptun 203 | 204 | 升级 kcptun 到 20170930 205 | 206 | - 2017-11-2 update kcptun 207 | 208 | 升级 kcptun 到 20171021 209 | 210 | - 2017-11-19 update kcptun 211 | 212 | 升级 kcptun 到 20171113 213 | 214 | - 2017-11-22 Fix a security issue in ss-manager. (CVE-2017-15924) 215 | 216 | Fix a security issue in ss-manager. (CVE-2017-15924) 217 | 218 | - 2017-12-11 update base image 219 | 220 | update base image 221 | 222 | - 2017-12-27 update kcptun 223 | 224 | update kcptun to 20171201 225 | 226 | - 2018-01-2 update shadowsocks 227 | 228 | update shadowsocks to 3.1.2(Fix a bug in DNS resolver;Add new TFO API support.) 229 | 230 | - 2018-01-22 update shadowsocks 231 | 232 | update shadowsocks to 3.1.3(Fix a bug in UDP relay.) 233 | 234 | - 2018-03-11 update kcptun 235 | 236 | update kcptun to 20180305 237 | 238 | - 2018-03-23 update kcptun 239 | 240 | update kcptun to 20180316(fix 'too man open files') 241 | 242 | - 2018-05-29 update shadowsocks 243 | 244 | update shadowsocks to 3.2.0(Add MinGW,Refine c-ares integration...) 245 | 246 | - 2018-07-09 update base image 247 | 248 | update base image to alpine 3.8 249 | 250 | - 2018-08-05 fix high-quality random numbers 251 | 252 | fix `system doesn't provide enough entropy to quickly generate high-quality random numbers` 253 | 254 | - 2018-08-16 update kcptun 255 | 256 | update kcptun to v20180810 257 | 258 | - 2018-09-27 update kcptun 259 | 260 | update kcptun to v20180926 261 | 262 | - 2018-11-06 add `-r` option 263 | 264 | update kcptun to v20181002 265 | add `-r` option to fix GCE `system doesn't provide enough entropy...` error 266 | 267 | - 2018-11-14 update shadowsocks 268 | 269 | update shadowsocks to v3.2.1 270 | 271 | - 2018-11-15 update kcptun 272 | 273 | update kcptun to v20181114 274 | 275 | - 2018-12-14 update shadowsocks 276 | 277 | update shadowsocks to v3.2.3 278 | 279 | - 2018-12-26 update kcptun 280 | 281 | update kcptun to v20181224 282 | 283 | - 2019-01-10 update kcptun 284 | 285 | update kcptun to v20190109 286 | 287 | - 2019-01-23 add v2ray-plugin 288 | 289 | add v2ray-plugin support 290 | 291 | - 2019-02-26 update to v3.2.4 292 | 293 | update shadowsocks to v3.2.4 294 | 295 | - 2019-04-14 update to v3.2.5 296 | 297 | update shadowsocks to v3.2.5, update kcptun to v20190409 298 | 299 | - 2019-04-24 update kcptun 300 | 301 | update kcptun to v20190424 302 | 303 | - 2019-04-29 add runit 304 | 305 | add runit, remove rng-tools 306 | 307 | - 2019-06-16 update kcptun 308 | 309 | update kcptun to v20190611 310 | 311 | - 2019-09-15 update shadowsocks to v3.3.1 312 | 313 | update shadowsocks to v3.3.1 314 | update kcptun to v20190905 315 | update v2ray-plugin to v1.1.0 316 | 317 | - 2019-09-24 update kcptun 318 | 319 | update kcptun to v20190923 320 | 321 | - 2019-11-01 update shadowsocks 322 | 323 | update shadowsocks to v3.3.3 324 | 325 | - 2019-12-17 fix port binding 326 | 327 | fix port binding 328 | update kcptun to v20191127 329 | 330 | - 2020-01-01 update kcptun 331 | 332 | update kcptun to v20191229 333 | update base image to alpine 3.11 334 | 335 | - 2020-02-28 update shadowsocks to v3.3.4 336 | 337 | update shadowsocks to v3.3.4 338 | update kcptun to v20200226 339 | update v2ray-plugin to 1.3.0 340 | 341 | - 2020-04-13 update kcptun 342 | 343 | update kcptun to v20200409 344 | 345 | - 2020-07-10 update kcptun 346 | 347 | update kcptun to v20200701 348 | update base image to alpine 3.12 349 | -------------------------------------------------------------------------------- /shadowsocks/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SS_CONFIG=${SS_CONFIG:-""} 4 | SS_MODULE=${SS_MODULE:-"ss-server"} 5 | KCP_CONFIG=${KCP_CONFIG:-""} 6 | KCP_MODULE=${KCP_MODULE:-"kcpserver"} 7 | KCP_FLAG=${KCP_FLAG:-"false"} 8 | 9 | while getopts "s:m:k:e:x" OPT; do 10 | case $OPT in 11 | s) 12 | SS_CONFIG=$OPTARG;; 13 | m) 14 | SS_MODULE=$OPTARG;; 15 | k) 16 | KCP_CONFIG=$OPTARG;; 17 | e) 18 | KCP_MODULE=$OPTARG;; 19 | x) 20 | KCP_FLAG="true";; 21 | esac 22 | done 23 | 24 | export SS_CONFIG=${SS_CONFIG} 25 | export SS_MODULE=${SS_MODULE} 26 | export KCP_CONFIG=${KCP_CONFIG} 27 | export KCP_MODULE=${KCP_MODULE} 28 | export KCP_FLAG=${KCP_FLAG} 29 | 30 | exec runsvdir -P /etc/service 31 | -------------------------------------------------------------------------------- /shadowsocks/runit/kcptun/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | exec 2>&1 4 | 5 | if [ "${KCP_FLAG}" == "true" ]; then 6 | 7 | if [ -z "${KCP_MODULE}" ]; then 8 | echo "Warning: KCP_MODULE is empty, default to kcpserver!" 9 | KCP_MODULE="kcpserver" 10 | fi 11 | 12 | if [ -n "${KCP_CONFIG}" ]; then 13 | echo "starting kcptun..." 14 | exec chpst -u kcptun ${KCP_MODULE} ${KCP_CONFIG} 15 | else 16 | echo "Error: KCP_CONFIG is empty, exit!" 17 | exit 1 18 | fi 19 | else 20 | exit 0 21 | fi 22 | 23 | -------------------------------------------------------------------------------- /shadowsocks/runit/shadowsocks/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | exec 2>&1 4 | 5 | if [ -z "${SS_MODULE}" ]; then 6 | echo "Warning: SS_MODULE is empty, default to ss-server!" 7 | SS_MODULE="ss-server" 8 | fi 9 | 10 | if [ -n "${SS_CONFIG}" ]; then 11 | echo "starting shadowsocks..." 12 | exec chpst -u shadowsocks ${SS_MODULE} ${SS_CONFIG} 13 | else 14 | echo "Error: SS_CONFIG is empty, exit!" 15 | exit 1 16 | fi 17 | -------------------------------------------------------------------------------- /simple-obfs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ='Asia/Shanghai' 6 | 7 | ENV TZ ${TZ} 8 | ENV OBFS_DOWNLOAD_URL https://github.com/shadowsocks/simple-obfs.git 9 | 10 | RUN apk upgrade --update \ 11 | && apk add bash tzdata \ 12 | && apk add --virtual .build-deps \ 13 | asciidoc \ 14 | autoconf \ 15 | automake \ 16 | g++ \ 17 | gcc \ 18 | libev-dev \ 19 | libpcre32 \ 20 | libtool \ 21 | linux-headers \ 22 | make \ 23 | openssl \ 24 | xmlto \ 25 | zlib-dev \ 26 | git \ 27 | && git clone ${OBFS_DOWNLOAD_URL} \ 28 | && (cd simple-obfs \ 29 | && git submodule update --init --recursive \ 30 | && ./autogen.sh && ./configure --disable-documentation\ 31 | && make && make install) \ 32 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 33 | && echo $TZ > /etc/timezone \ 34 | && runDeps="$( \ 35 | scanelf --needed --nobanner /usr/local/bin/obfs-* \ 36 | | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ 37 | | xargs -r apk info --installed \ 38 | | sort -u \ 39 | )" \ 40 | && apk add --virtual .run-deps $runDeps \ 41 | && apk del .build-deps \ 42 | && rm -rf simple-obfs \ 43 | /var/cache/apk/* 44 | 45 | CMD ["obfs-server","--help"] 46 | -------------------------------------------------------------------------------- /sniproxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ENV TZ 'Asia/Shanghai' 6 | 7 | RUN apk upgrade --no-cache && \ 8 | apk add --no-cache bash tzdata sniproxy && \ 9 | ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ 10 | echo "Asia/Shanghai" > /etc/timezone && \ 11 | rm -rf /var/cache/apk/* 12 | 13 | COPY sniproxy.conf /etc/sniproxy.conf 14 | 15 | COPY entrypoint.sh /entrypoint.sh 16 | 17 | EXPOSE 443 18 | 19 | ENTRYPOINT ["/entrypoint.sh"] 20 | -------------------------------------------------------------------------------- /sniproxy/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -n "$1" ];then 5 | exec sniproxy "$@" 6 | else 7 | exec sniproxy -f -c /etc/sniproxy.conf 8 | fi 9 | -------------------------------------------------------------------------------- /sniproxy/sniproxy.conf: -------------------------------------------------------------------------------- 1 | user nobody 2 | listen 0.0.0.0:443 { 3 | proto tls 4 | table https_hosts 5 | } 6 | 7 | table https_hosts { 8 | .* *:443 9 | } 10 | -------------------------------------------------------------------------------- /swagger-editor/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.17.1-alpine 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | ENV SWAGGERUI_VERSION 3.6.1 10 | ENV SWAGGERUI_DOWNLOAD_URL https://github.com/swagger-api/swagger-editor/archive/v${SWAGGERUI_VERSION}.tar.gz 11 | 12 | RUN apk upgrade --update \ 13 | && apk add bash tzdata tar wget ca-certificates \ 14 | && wget ${SWAGGERUI_DOWNLOAD_URL} \ 15 | && tar -zxf v${SWAGGERUI_VERSION}.tar.gz \ 16 | && mv swagger-editor-${SWAGGERUI_VERSION}/index.html /usr/share/nginx/html \ 17 | && mv swagger-editor-${SWAGGERUI_VERSION}/dist /usr/share/nginx/html/dist \ 18 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 19 | && echo ${TZ} > /etc/timezone \ 20 | && apk del wget curl tar ca-certificates \ 21 | && rm -rf v${SWAGGERUI_VERSION}.tar.gz \ 22 | swagger-editor-${SWAGGERUI_VERSION} \ 23 | /var/cache/apk/* 24 | 25 | EXPOSE 80 26 | 27 | STOPSIGNAL SIGTERM 28 | 29 | CMD ["nginx", "-g", "daemon off;"] 30 | -------------------------------------------------------------------------------- /teleport/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | ENV TELEPORT_VERSION v4.0.2 9 | ENV TELEPORT_DOWNLOAD_URL https://get.gravitational.com/teleport-${TELEPORT_VERSION}-linux-amd64-bin.tar.gz 10 | 11 | RUN apk upgrade \ 12 | && apk add bash tzdata libc6-compat wget tar ca-certificates \ 13 | && wget -q ${TELEPORT_DOWNLOAD_URL} \ 14 | && tar -zxvf teleport-${TELEPORT_VERSION}-linux-amd64-bin.tar.gz \ 15 | && mv teleport/tctl teleport/teleport teleport/tsh /usr/bin \ 16 | && mkdir /etc/teleport \ 17 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 18 | && echo ${TZ} > /etc/timezone \ 19 | && apk del wget tar \ 20 | && rm -rf /*.tar.gz /teleport /var/cache/apk/* 21 | 22 | COPY teleport.yaml /etc/teleport/teleport.yaml 23 | 24 | VOLUME /var/lib/teleport /etc/teleport 25 | 26 | EXPOSE 3022-3026 3080 27 | 28 | CMD ["teleport","start","-c","/etc/teleport/teleport.yaml"] 29 | -------------------------------------------------------------------------------- /teleport/teleport.yaml: -------------------------------------------------------------------------------- 1 | # By default, this file should be stored in /etc/teleport.yaml 2 | 3 | # This section of the configuration file applies to all teleport 4 | # services. 5 | teleport: 6 | # nodename allows to assign an alternative name this node can be reached by. 7 | # by default it's equal to hostname 8 | nodename: graviton 9 | 10 | # Data directory where Teleport daemon keeps its data. 11 | # See "Filesystem Layout" section above for more details. 12 | data_dir: /var/lib/teleport 13 | 14 | # Invitation token used to join a cluster. it is not used on 15 | # subsequent starts 16 | auth_token: xxxx-token-xxxx 17 | 18 | # When running in multi-homed or NATed environments Teleport nodes need 19 | # to know which IP it will be reachable at by other nodes 20 | # 21 | # This value can be specified as FQDN e.g. host.example.com 22 | advertise_ip: 10.1.0.5 23 | 24 | # list of auth servers in a cluster. you will have more than one auth server 25 | # if you configure teleport auth to run in HA configuration 26 | auth_servers: 27 | - 10.1.0.5:3025 28 | - 10.1.0.6:3025 29 | 30 | # Teleport throttles all connections to avoid abuse. These settings allow 31 | # you to adjust the default limits 32 | connection_limits: 33 | max_connections: 1000 34 | max_users: 250 35 | 36 | # Logging configuration. Possible output values are 'stdout', 'stderr' and 37 | # 'syslog'. Possible severity values are INFO, WARN and ERROR (default). 38 | log: 39 | output: stderr 40 | severity: ERROR 41 | 42 | # Type of storage used for keys. You need to configure this to use etcd or 43 | # a DynamoDB backend if you want to run Teleport in HA configuration. 44 | storage: 45 | # By default teleport uses the `data_dir` directory on a local filesystem 46 | type: dir 47 | 48 | # Array of locations where the audit log events will be stored. by 49 | # default they are stored in `/var/lib/teleport/log` 50 | audit_events_uri: [file:///var/lib/teleport/log, dynamo://events_table_name] 51 | 52 | # Use this setting to configure teleport to store the recorded sessions in 53 | # an AWS S3 bucket. see "Using Amazon S3" chapter for more information. 54 | audit_sessions_uri: s3://name-of-s3-bucket 55 | 56 | # Cipher algorithms that the server supports. This section only needs to be 57 | # set if you want to override the defaults. 58 | ciphers: 59 | - aes128-ctr 60 | - aes192-ctr 61 | - aes256-ctr 62 | - aes128-gcm@openssh.com 63 | - arcfour256 64 | - arcfour128 65 | 66 | # Key exchange algorithms that the server supports. This section only needs 67 | # to be set if you want to override the defaults. 68 | kex_algos: 69 | - curve25519-sha256@libssh.org 70 | - ecdh-sha2-nistp256 71 | - ecdh-sha2-nistp384 72 | - ecdh-sha2-nistp521 73 | - diffie-hellman-group14-sha1 74 | - diffie-hellman-group1-sha1 75 | 76 | # Message authentication code (MAC) algorithms that the server supports. 77 | # This section only needs to be set if you want to override the defaults. 78 | mac_algos: 79 | - hmac-sha2-256-etm@openssh.com 80 | - hmac-sha2-256 81 | - hmac-sha1 82 | - hmac-sha1-96 83 | 84 | # List of the supported ciphersuites. If this section is not specified, 85 | # only the default ciphersuites are enabled. 86 | ciphersuites: 87 | - tls-rsa-with-aes-128-cbc-sha # default 88 | - tls-rsa-with-aes-256-cbc-sha # default 89 | - tls-rsa-with-aes-128-cbc-sha256 90 | - tls-rsa-with-aes-128-gcm-sha256 91 | - tls-rsa-with-aes-256-gcm-sha384 92 | - tls-ecdhe-ecdsa-with-aes-128-cbc-sha 93 | - tls-ecdhe-ecdsa-with-aes-256-cbc-sha 94 | - tls-ecdhe-rsa-with-aes-128-cbc-sha 95 | - tls-ecdhe-rsa-with-aes-256-cbc-sha 96 | - tls-ecdhe-ecdsa-with-aes-128-cbc-sha256 97 | - tls-ecdhe-rsa-with-aes-128-cbc-sha256 98 | - tls-ecdhe-rsa-with-aes-128-gcm-sha256 99 | - tls-ecdhe-ecdsa-with-aes-128-gcm-sha256 100 | - tls-ecdhe-rsa-with-aes-256-gcm-sha384 101 | - tls-ecdhe-ecdsa-with-aes-256-gcm-sha384 102 | - tls-ecdhe-rsa-with-chacha20-poly1305 103 | - tls-ecdhe-ecdsa-with-chacha20-poly1305 104 | 105 | 106 | # This section configures the 'auth service': 107 | auth_service: 108 | # Turns 'auth' role on. Default is 'yes' 109 | enabled: yes 110 | 111 | # A cluster name is used as part of a signature in certificates 112 | # generated by this CA. 113 | # 114 | # We strongly recommend to explicitly set it to something meaningful as it 115 | # becomes important when configuring trust between multiple clusters. 116 | # 117 | # By default an automatically generated name is used (not recommended) 118 | # 119 | # IMPORTANT: if you change cluster_name, it will invalidate all generated 120 | # certificates and keys (may need to wipe out /var/lib/teleport directory) 121 | cluster_name: "main" 122 | 123 | authentication: 124 | # default authentication type. possible values are 'local', 'oidc' and 'saml' 125 | # only local authentication (Teleport's own user DB) is supported in the open 126 | # source version 127 | type: local 128 | # second_factor can be off, otp, or u2f 129 | second_factor: otp 130 | # this section is used if second_factor is set to 'u2f' 131 | u2f: 132 | # app_id must point to the URL of the Teleport Web UI (proxy) accessible 133 | # by the end users 134 | app_id: https://localhost:3080 135 | # facets must list all proxy servers if there are more than one deployed 136 | facets: 137 | - https://localhost:3080 138 | 139 | # IP and the port to bind to. Other Teleport nodes will be connecting to 140 | # this port (AKA "Auth API" or "Cluster API") to validate client 141 | # certificates 142 | listen_addr: 0.0.0.0:3025 143 | 144 | # The optional DNS name the auth server if locataed behind a load balancer. 145 | # (see public_addr section below) 146 | public_addr: auth.example.com:3025 147 | 148 | # Pre-defined tokens for adding new nodes to a cluster. Each token specifies 149 | # the role a new node will be allowed to assume. The more secure way to 150 | # add nodes is to use `ttl node add --ttl` command to generate auto-expiring 151 | # tokens. 152 | # 153 | # We recommend to use tools like `pwgen` to generate sufficiently random 154 | # tokens of 32+ byte length. 155 | tokens: 156 | - "proxy,node:xxxxx" 157 | - "auth:yyyy" 158 | 159 | # Optional setting for configuring session recording. Possible values are: 160 | # "node" : sessions will be recorded on the node level (the default) 161 | # "proxy" : recording on the proxy level, see "recording proxy mode" section. 162 | # "off" : session recording is turned off 163 | session_recording: "node" 164 | 165 | # This setting determines if a Teleport proxy performs strict host key checks. 166 | # Only applicable if session_recording=proxy, see "recording proxy mode" for details. 167 | proxy_checks_host_keys: yes 168 | 169 | # Determines if SSH sessions to cluster nodes are forcefully terminated 170 | # after no activity from a client (idle client). 171 | # Examples: "30m", "1h" or "1h30m" 172 | client_idle_timeout: never 173 | 174 | # Determines if the clients will be forcefully disconnected when their 175 | # certificates expire in the middle of an active SSH session. (default is 'no') 176 | disconnect_expired_cert: no 177 | 178 | # License file to start auth server with. Note that this setting is ignored 179 | # in open-source Teleport and is required only for Teleport Pro, Business 180 | # and Enterprise subscription plans. 181 | # 182 | # The path can be either absolute or relative to the configured `data_dir` 183 | # and should point to the license file obtained from Teleport Download Portal. 184 | # 185 | # If not set, by default Teleport will look for the `license.pem` file in 186 | # the configured `data_dir`. 187 | license_file: /var/lib/teleport/license.pem 188 | 189 | # If the auth service is deployed outside Kubernetes, but Kubernetes integration 190 | # is required, you have to specify a valid kubeconfig credentials: 191 | kubeconfig_file: /path/to/kubeconfig 192 | 193 | # This section configures the 'node service': 194 | ssh_service: 195 | # Turns 'ssh' role on. Default is 'yes' 196 | enabled: yes 197 | 198 | # IP and the port for SSH service to bind to. 199 | listen_addr: 0.0.0.0:3022 200 | 201 | # The optional public address the SSH service. This is useful if administrators 202 | # want to allow users to connect to nodes directly, bypassing a Teleport proxy 203 | # (see public_addr section below) 204 | public_addr: node.example.com:3022 205 | 206 | # See explanation of labels in "Labeling Nodes" section below 207 | labels: 208 | role: master 209 | type: postgres 210 | 211 | # List of the commands to periodically execute. Their output will be used as node labels. 212 | # See "Labeling Nodes" section below for more information. 213 | commands: 214 | - name: arch # this command will add a label like 'arch=x86_64' to a node 215 | command: [uname, -p] 216 | period: 1h0m0s 217 | 218 | # enables reading ~/.tsh/environment before creating a session. by default 219 | # set to false, can be set true here or as a command line flag. 220 | permit_user_env: false 221 | 222 | # configures PAM integration. see below for more details. 223 | pam: 224 | enabled: no 225 | service_name: teleport 226 | 227 | # This section configures the 'proxy servie' 228 | proxy_service: 229 | # Turns 'proxy' role on. Default is 'yes' 230 | enabled: yes 231 | 232 | # SSH forwarding/proxy address. Command line (CLI) clients always begin their 233 | # SSH sessions by connecting to this port 234 | listen_addr: 0.0.0.0:3023 235 | 236 | # Reverse tunnel listening address. An auth server (CA) can establish an 237 | # outbound (from behind the firewall) connection to this address. 238 | # This will allow users of the outside CA to connect to behind-the-firewall 239 | # nodes. 240 | tunnel_listen_addr: 0.0.0.0:3024 241 | 242 | # The HTTPS listen address to serve the Web UI and also to authenticate the 243 | # command line (CLI) users via password+HOTP 244 | web_listen_addr: 0.0.0.0:3080 245 | 246 | # The DNS name the proxy server is accessible by cluster users. Defaults to 247 | # the proxy's hostname if not specified. If running multiple proxies behind 248 | # a load balancer, this name must point to the load balancer 249 | # (see public_addr section below) 250 | public_addr: proxy.example.com:3080 251 | 252 | # TLS certificate for the HTTPS connection. Configuring these properly is 253 | # critical for Teleport security. 254 | https_key_file: /var/lib/teleport/webproxy_key.pem 255 | https_cert_file: /var/lib/teleport/webproxy_cert.pem 256 | -------------------------------------------------------------------------------- /time-machine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | ENV NETATALK_VERSION 3.1.12 9 | ENV NETATALK_DOWNLOAD_URL https://downloads.sourceforge.net/project/netatalk/netatalk/${NETATALK_VERSION}/netatalk-${NETATALK_VERSION}.tar.gz 10 | 11 | RUN set -ex \ 12 | && apk --update upgrade \ 13 | && apk add bash tzdata libldap libgcrypt python \ 14 | dbus dbus-glib py-dbus linux-pam cracklib db \ 15 | libevent file acl openssl avahi runit \ 16 | && apk add --no-cache --virtual .build-deps \ 17 | build-base autoconf automake libtool libgcrypt-dev \ 18 | linux-pam-dev cracklib-dev acl-dev db-dev dbus-dev libevent-dev \ 19 | && wget -q ${NETATALK_DOWNLOAD_URL} \ 20 | && tar -zxf netatalk-${NETATALK_VERSION}.tar.gz \ 21 | && (cd netatalk-${NETATALK_VERSION} \ 22 | && CFLAGS="-Wno-unused-result -O2" ./configure \ 23 | --prefix=/usr \ 24 | --localstatedir=/var/state \ 25 | --sysconfdir=/etc \ 26 | --with-dbus-sysconf-dir=/etc/dbus-1/system.d/ \ 27 | --with-init-style=debian-sysv \ 28 | --sbindir=/usr/bin \ 29 | --enable-quota \ 30 | --with-tdb \ 31 | --enable-silent-rules \ 32 | --with-cracklib \ 33 | --with-cnid-cdb-backend \ 34 | --enable-pgp-uam \ 35 | --with-acls \ 36 | && make && make install) \ 37 | && sed -i 's@#host-name.*@host-name=TimeMachine@g' /etc/avahi/avahi-daemon.conf \ 38 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 39 | && echo ${TZ} > /etc/timezone \ 40 | && apk del .build-deps \ 41 | && rm -rf /netatalk-${NETATALK_VERSION}* \ 42 | /etc/avahi/services/* \ 43 | /var/cache/apk/* 44 | 45 | EXPOSE 548 636 46 | 47 | COPY entrypoint.sh /entrypoint.sh 48 | COPY conf/afp.conf /etc/afp.conf 49 | COPY conf/afpd.service /etc/avahi/services/afpd.service 50 | COPY services /etc/runit/services 51 | 52 | VOLUME ["/data"] 53 | 54 | ENTRYPOINT ["/entrypoint.sh"] 55 | -------------------------------------------------------------------------------- /time-machine/README.md: -------------------------------------------------------------------------------- 1 | ### Time Machine 2 | 3 | 一个基于 Alpine 系统的 netatalk 和 avahi 的用于 Mac Time Machine 备份镜像 4 | 5 | ### 启动方式 6 | 7 | > 由于 avahi 自动发现服务需要绑定网卡接口,所以容器需要使用 host 网络模式启动, 8 | 以保证同一局域网下的 Mac 设备能正确发现 TimeMachine 备份容器 9 | 10 | - 纯 docker 启动 11 | 12 | ``` sh 13 | docker run -dt --name time-machine -v /data:/data --network host mritd/time-machine -u testuser -p 12345678 14 | ``` 15 | 16 | - docker-compoe 启动 17 | 18 | ``` sh 19 | # docker-compose 文件如下 20 | version: '3.5' 21 | services: 22 | time-machine: 23 | image: mritd/time-machine 24 | restart: always 25 | container_name: time-machine 26 | network_mode: "host" 27 | volumes: 28 | - /data:/data 29 | command: "-u testuser -p 12345678" 30 | 31 | # 最后启动即可 32 | docker-compose up -d 33 | ``` 34 | 35 | ### 使用方法 36 | 37 | 容器启动后在**与宿主机同一局域网**的 Mac 机器能够在 Finder 中的 `共享的` 一栏中发现; 38 | 打开后右上角点击链接按钮,然后输入账户和密码即可成功链接;此时打开 TimeMachine 备份磁盘 39 | 中选择刚刚建立连接的磁盘即可 40 | 41 | ### Update 42 | 43 | - 2019-07-21: 支持 `-i` 选项定义 user id,升级 netatalk 到 3.1.12 44 | -------------------------------------------------------------------------------- /time-machine/conf/afp.conf: -------------------------------------------------------------------------------- 1 | [Global] 2 | mimic model = Xserve 3 | hostname = TimeMachine 4 | log file = /dev/stdout 5 | log level = default:warn 6 | zeroconf = no 7 | -------------------------------------------------------------------------------- /time-machine/conf/afpd.service: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %h 5 | 6 | _afpovertcp._tcp 7 | 548 8 | 9 | 10 | _device-info._tcp 11 | 0 12 | model=Xserve 13 | 14 | 15 | -------------------------------------------------------------------------------- /time-machine/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | USER_NAME=${USER_NAME:-"mritd"} 4 | USER_ID=${USER_ID:-"1000"} 5 | PASSWORD=${PASSWORD:-"123456"} 6 | MOUNT_POINT=${MOUNT_POINT-"/data"} 7 | VOL_SIZE_MB=${VOL_SIZE_MB-"512000"} 8 | 9 | while getopts "u:i:p:m:v" OPT; do 10 | case $OPT in 11 | u) 12 | USER_NAME=$OPTARG;; 13 | i) 14 | USER_ID=$OPTARG;; 15 | p) 16 | PASSWORD=$OPTARG;; 17 | m) 18 | MOUNT_POINT=$OPTARG;; 19 | v) 20 | VOL_SIZE_MB=$OPTARG;; 21 | esac 22 | done 23 | 24 | cat /etc/passwd | grep ${USER_NAME} >& /dev/null 25 | 26 | if [ $? -ne 0 ];then 27 | echo "Add user: ${USER_NAME}..." 28 | adduser -S -H -G root ${USER_NAME} -u ${USER_ID} 29 | echo ${USER_NAME}:${PASSWORD} | chpasswd &> /dev/null 30 | else 31 | echo "User: ${USER_NAME} already exists!" 32 | fi 33 | 34 | mkdir -p ${MOUNT_POINT} 35 | chown -R ${USER_NAME}:root ${MOUNT_POINT} 36 | 37 | cat /etc/afp.conf | grep "${USER_NAME}" >& /dev/null 38 | 39 | if [ $? -ne 0 ];then 40 | echo "Update /etc/afp.conf..." 41 | cat << EOF >> /etc/afp.conf 42 | [${USER_NAME}] 43 | valid users = ${USER_NAME} 44 | path = ${MOUNT_POINT} 45 | time machine = yes 46 | vol size limit = ${VOL_SIZE_MB} 47 | EOF 48 | else 49 | echo "afp.conf already modify!" 50 | fi 51 | 52 | echo "Starting..." 53 | 54 | if [ -e /var/run/dbus.pid ]; then 55 | rm -f /var/run/dbus.pid 56 | fi 57 | 58 | if [ -e /var/run/dbus/system_bus_socket ]; then 59 | rm -f /var/run/dbus/system_bus_socket 60 | fi 61 | 62 | dbus-daemon --system 63 | 64 | runsvdir /etc/runit/services 65 | -------------------------------------------------------------------------------- /time-machine/services/avahi/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | avahi-daemon 4 | -------------------------------------------------------------------------------- /time-machine/services/netatalk/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -f /var/lock/netatalk 4 | netatalk -d 5 | -------------------------------------------------------------------------------- /tor/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ='Asia/Shanghai' 6 | 7 | ENV TZ ${TZ} 8 | 9 | RUN apk upgrade --update \ 10 | && apk add tor privoxy bash tzdata su-exec \ 11 | && ln -sf /dev/stdout /var/log/tor/notices.log \ 12 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 13 | && echo "${TZ}" > /etc/timezone \ 14 | && rm -rf /var/cache/apk/* 15 | 16 | COPY torrc /etc/tor/torrc 17 | 18 | COPY entrypoint.sh /entrypoint.sh 19 | 20 | CMD ["/entrypoint.sh"] 21 | -------------------------------------------------------------------------------- /tor/README.md: -------------------------------------------------------------------------------- 1 | ## Alpine Tor 2 | 3 | > 这是一个匿名代理工具 Tor 的 docker 镜像,基于 alpine 制作 4 | 5 | 6 | ### Tor 使用 7 | 8 | 启动 Tor 匿名代理 9 | 10 | ``` sh 11 | docker run -d --name tor -p 9100:9100 mritd/tor 12 | ``` 13 | 14 | **默认情况下 Tor 监听在 `0.0.0.0:9100` 端口上,若想通过 Tor 代理访问网络,请将浏览器代理设置到 `socks5://TOR-DOCKER-IP:9100` 即可** 15 | 16 | 17 | ### Tor 相关设置 18 | 19 | **该 Tor 镜像默认配置文件位于 `/etc/tor/torrc`,该文件中定义了 Tor 日志位置、代理模式、前置代理、排除节点等相关设置,一些相关选项如下:** 20 | 21 | - ExcludeNodes: 排除不可信节点,防止 Tor 蜜罐,目前预设 `{cn},{hk},{mo}` (中国、香港、澳门),其他国家请自行查阅 22 | - HTTPProxy: Tor 前置 HTTP 代理,众所周知的原因国内 Tor 节点无法连接,所以如需设置前置代理请修改此项 23 | - HTTPSProxy: Tor 前置 HTTPS 代理,作用同上 24 | - Socks5Proxy: Tor 前置 Socks5 代理,作用同上 25 | -------------------------------------------------------------------------------- /tor/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | chown tor:nogroup /var/log/tor/notices.log 4 | su-exec tor tor 5 | -------------------------------------------------------------------------------- /tor/torrc: -------------------------------------------------------------------------------- 1 | ## Configuration file for a typical Tor user 2 | ## Last updated 22 September 2015 for Tor 0.2.7.3-alpha. 3 | ## (may or may not work for much older or much newer versions of Tor.) 4 | ## 5 | ## Lines that begin with "## " try to explain what's going on. Lines 6 | ## that begin with just "#" are disabled commands: you can enable them 7 | ## by removing the "#" symbol. 8 | ## 9 | ## See 'man tor', or https://www.torproject.org/docs/tor-manual.html, 10 | ## for more options you can use in this file. 11 | ## 12 | ## Tor will look for this file in various places based on your platform: 13 | ## https://www.torproject.org/docs/faq#torrc 14 | 15 | ## Tor opens a SOCKS proxy on port 9050 by default -- even if you don't 16 | ## configure one below. Set "SOCKSPort 0" if you plan to run Tor only 17 | ## as a relay, and not make any local application connections yourself. 18 | #SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections. 19 | SOCKSPort 0.0.0.0:9100 # Bind to this address:port too. 20 | 21 | ## Entry policies to allow/deny SOCKS requests based on IP address. 22 | ## First entry that matches wins. If no SOCKSPolicy is set, we accept 23 | ## all (and only) requests that reach a SOCKSPort. Untrusted users who 24 | ## can access your SOCKSPort may be able to learn about the connections 25 | ## you make. 26 | #SOCKSPolicy accept 192.168.0.0/16 27 | #SOCKSPolicy accept6 FC00::/7 28 | #SOCKSPolicy reject * 29 | 30 | ## Logs go to stdout at level "notice" unless redirected by something 31 | ## else, like one of the below lines. You can have as many Log lines as 32 | ## you want. 33 | ## 34 | ## We advise using "notice" in most cases, since anything more verbose 35 | ## may provide sensitive information to an attacker who obtains the logs. 36 | ## 37 | ## Send all messages of level 'notice' or higher to /var/log/tor/notices.log 38 | Log notice file /var/log/tor/notices.log 39 | ## Send every possible message to /var/log/tor/debug.log 40 | #Log debug file /var/log/tor/debug.log 41 | ## Use the system log instead of Tor's logfiles 42 | #Log notice syslog 43 | ## To send all messages to stderr: 44 | #Log debug stderr 45 | 46 | ## The directory for keeping all the keys/etc. By default, we store 47 | ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows. 48 | DataDirectory /var/lib/tor 49 | 50 | ## The port on which Tor will listen for local connections from Tor 51 | ## controller applications, as documented in control-spec.txt. 52 | #ControlPort 9051 53 | ## If you enable the controlport, be sure to enable one of these 54 | ## authentication methods, to prevent attackers from accessing it. 55 | #HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C 56 | #CookieAuthentication 1 57 | 58 | ############### This section is just for location-hidden services ### 59 | 60 | ## Once you have configured a hidden service, you can look at the 61 | ## contents of the file ".../hidden_service/hostname" for the address 62 | ## to tell people. 63 | ## 64 | ## HiddenServicePort x y:z says to redirect requests on port x to the 65 | ## address y:z. 66 | 67 | #HiddenServiceDir /var/lib/tor/hidden_service/ 68 | #HiddenServicePort 80 127.0.0.1:80 69 | 70 | #HiddenServiceDir /var/lib/tor/other_hidden_service/ 71 | #HiddenServicePort 80 127.0.0.1:80 72 | #HiddenServicePort 22 127.0.0.1:22 73 | 74 | ################ This section is just for relays ##################### 75 | # 76 | ## See https://www.torproject.org/docs/tor-doc-relay for details. 77 | 78 | ## Required: what port to advertise for incoming Tor connections. 79 | #ORPort 9001 80 | ## If you want to listen on a port other than the one advertised in 81 | ## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as 82 | ## follows. You'll need to do ipchains or other port forwarding 83 | ## yourself to make this work. 84 | #ORPort 443 NoListen 85 | #ORPort 127.0.0.1:9090 NoAdvertise 86 | 87 | ## The IP address or full DNS name for incoming connections to your 88 | ## relay. Leave commented out and Tor will guess. 89 | #Address noname.example.com 90 | 91 | ## If you have multiple network interfaces, you can specify one for 92 | ## outgoing traffic to use. 93 | ## OutboundBindAddressExit will be used for all exit traffic, while 94 | ## OutboundBindAddressOR will be used for all other connections. 95 | ## If you do not wish to differentiate, use OutboundBindAddress to 96 | ## specify the same address for both in a single line. 97 | #OutboundBindAddressExit 10.0.0.4 98 | #OutboundBindAddressOR 10.0.0.5 99 | 100 | ## A handle for your relay, so people don't have to refer to it by key. 101 | ## Nicknames must be between 1 and 19 characters inclusive, and must 102 | ## contain only the characters [a-zA-Z0-9]. 103 | #Nickname ididnteditheconfig 104 | 105 | ## Define these to limit how much relayed traffic you will allow. Your 106 | ## own traffic is still unthrottled. Note that RelayBandwidthRate must 107 | ## be at least 75 kilobytes per second. 108 | ## Note that units for these config options are bytes (per second), not 109 | ## bits (per second), and that prefixes are binary prefixes, i.e. 2^10, 110 | ## 2^20, etc. 111 | #RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps) 112 | #RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb) 113 | 114 | ## Use these to restrict the maximum traffic per day, week, or month. 115 | ## Note that this threshold applies separately to sent and received bytes, 116 | ## not to their sum: setting "40 GB" may allow up to 80 GB total before 117 | ## hibernating. 118 | ## 119 | ## Set a maximum of 40 gigabytes each way per period. 120 | #AccountingMax 40 GBytes 121 | ## Each period starts daily at midnight (AccountingMax is per day) 122 | #AccountingStart day 00:00 123 | ## Each period starts on the 3rd of the month at 15:00 (AccountingMax 124 | ## is per month) 125 | #AccountingStart month 3 15:00 126 | 127 | ## Administrative contact information for this relay or bridge. This line 128 | ## can be used to contact you if your relay or bridge is misconfigured or 129 | ## something else goes wrong. Note that we archive and publish all 130 | ## descriptors containing these lines and that Google indexes them, so 131 | ## spammers might also collect them. You may want to obscure the fact that 132 | ## it's an email address and/or generate a new address for this purpose. 133 | #ContactInfo Random Person 134 | ## You might also include your PGP or GPG fingerprint if you have one: 135 | #ContactInfo 0xFFFFFFFF Random Person 136 | 137 | ## Uncomment this to mirror directory information for others. Please do 138 | ## if you have enough bandwidth. 139 | #DirPort 9030 # what port to advertise for directory connections 140 | ## If you want to listen on a port other than the one advertised in 141 | ## DirPort (e.g. to advertise 80 but bind to 9091), you can do it as 142 | ## follows. below too. You'll need to do ipchains or other port 143 | ## forwarding yourself to make this work. 144 | #DirPort 80 NoListen 145 | #DirPort 127.0.0.1:9091 NoAdvertise 146 | ## Uncomment to return an arbitrary blob of html on your DirPort. Now you 147 | ## can explain what Tor is if anybody wonders why your IP address is 148 | ## contacting them. See contrib/tor-exit-notice.html in Tor's source 149 | ## distribution for a sample. 150 | #DirPortFrontPage /etc/tor/tor-exit-notice.html 151 | 152 | ## Uncomment this if you run more than one Tor relay, and add the identity 153 | ## key fingerprint of each Tor relay you control, even if they're on 154 | ## different networks. You declare it here so Tor clients can avoid 155 | ## using more than one of your relays in a single circuit. See 156 | ## https://www.torproject.org/docs/faq#MultipleRelays 157 | ## However, you should never include a bridge's fingerprint here, as it would 158 | ## break its concealability and potentially reveal its IP/TCP address. 159 | #MyFamily $keyid,$keyid,... 160 | 161 | ## A comma-separated list of exit policies. They're considered first 162 | ## to last, and the first match wins. 163 | ## 164 | ## If you want to allow the same ports on IPv4 and IPv6, write your rules 165 | ## using accept/reject *. If you want to allow different ports on IPv4 and 166 | ## IPv6, write your IPv6 rules using accept6/reject6 *6, and your IPv4 rules 167 | ## using accept/reject *4. 168 | ## 169 | ## If you want to _replace_ the default exit policy, end this with either a 170 | ## reject *:* or an accept *:*. Otherwise, you're _augmenting_ (prepending to) 171 | ## the default exit policy. Leave commented to just use the default, which is 172 | ## described in the man page or at 173 | ## https://www.torproject.org/documentation.html 174 | ## 175 | ## Look at https://www.torproject.org/faq-abuse.html#TypicalAbuses 176 | ## for issues you might encounter if you use the default exit policy. 177 | ## 178 | ## If certain IPs and ports are blocked externally, e.g. by your firewall, 179 | ## you should update your exit policy to reflect this -- otherwise Tor 180 | ## users will be told that those destinations are down. 181 | ## 182 | ## For security, by default Tor rejects connections to private (local) 183 | ## networks, including to the configured primary public IPv4 and IPv6 addresses, 184 | ## and any public IPv4 and IPv6 addresses on any interface on the relay. 185 | ## See the man page entry for ExitPolicyRejectPrivate if you want to allow 186 | ## "exit enclaving". 187 | ## 188 | #ExitPolicy accept *:6660-6667,reject *:* # allow irc ports on IPv4 and IPv6 but no more 189 | #ExitPolicy accept *:119 # accept nntp ports on IPv4 and IPv6 as well as default exit policy 190 | #ExitPolicy accept *4:119 # accept nntp ports on IPv4 only as well as default exit policy 191 | #ExitPolicy accept6 *6:119 # accept nntp ports on IPv6 only as well as default exit policy 192 | #ExitPolicy reject *:* # no exits allowed 193 | 194 | ## Bridge relays (or "bridges") are Tor relays that aren't listed in the 195 | ## main directory. Since there is no complete public list of them, even an 196 | ## ISP that filters connections to all the known Tor relays probably 197 | ## won't be able to block all the bridges. Also, websites won't treat you 198 | ## differently because they won't know you're running Tor. If you can 199 | ## be a real relay, please do; but if not, be a bridge! 200 | #BridgeRelay 1 201 | ## By default, Tor will advertise your bridge to users through various 202 | ## mechanisms like https://bridges.torproject.org/. If you want to run 203 | ## a private bridge, for example because you'll give out your bridge 204 | ## address manually to your friends, uncomment this line: 205 | #PublishServerDescriptor 0 206 | 207 | ExcludeNodes {cn},{hk},{mo} 208 | StrictNodes 1 209 | #HTTPProxy 192.168.1.1:8080 210 | #HTTPSProxy 192.168.1.1:8080 211 | #Socks5Proxy 192.168.1.1:1080 212 | -------------------------------------------------------------------------------- /twemproxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | ENV TWEMPROXY_VERSION 0.4.1 4 | ENV TWEMPROXY_CONFIG_DIR /etc/twemproxy 5 | ENV TWEMPROXY_DOWNLOAD_URL https://github.com/twitter/twemproxy/archive/v${TWEMPROXY_VERSION}.tar.gz 6 | 7 | RUN apk upgrade --update \ 8 | && apk add libtool build-base make automake autoconf wget ca-certificates \ 9 | && wget ${TWEMPROXY_DOWNLOAD_URL} -O twemproxy.tar.gz \ 10 | && tar -zxvf twemproxy.tar.gz \ 11 | && (cd twemproxy-${TWEMPROXY_VERSION} \ 12 | && autoreconf -fvi \ 13 | && ./configure --prefix=/ \ 14 | && make -j2 \ 15 | && make install) 16 | 17 | FROM alpine:3.10 18 | 19 | LABEL maintainer="mritd " 20 | 21 | ARG TZ="Asia/Shanghai" 22 | 23 | ENV TZ ${TZ} 24 | ENV TWEMPROXY_VERSION 0.4.1 25 | ENV TWEMPROXY_CONFIG_DIR /etc/twemproxy 26 | 27 | RUN apk upgrade --update \ 28 | && apk add bash tzdata \ 29 | && mkdir ${TWEMPROXY_CONFIG_DIR} \ 30 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 31 | && echo ${TZ} > /etc/timezone \ 32 | && rm -rf /var/cache/apk/* 33 | 34 | COPY --from=0 /sbin/nutcracker /sbin/ 35 | COPY config.yml ${TWEMPROXY_CONFIG_DIR} 36 | COPY entrypoint.sh /entrypoint.sh 37 | 38 | CMD ["/entrypoint.sh"] 39 | -------------------------------------------------------------------------------- /twemproxy/config.yml: -------------------------------------------------------------------------------- 1 | alpha: 2 | listen: 127.0.0.1:22121 3 | hash: fnv1a_64 4 | distribution: ketama 5 | auto_eject_hosts: true 6 | redis: true 7 | server_retry_timeout: 2000 8 | server_failure_limit: 1 9 | servers: 10 | - 127.0.0.1:6379:1 11 | 12 | beta: 13 | listen: 127.0.0.1:22122 14 | hash: fnv1a_64 15 | hash_tag: "{}" 16 | distribution: ketama 17 | auto_eject_hosts: false 18 | timeout: 400 19 | redis: true 20 | servers: 21 | - 127.0.0.1:6380:1 server1 22 | - 127.0.0.1:6381:1 server2 23 | - 127.0.0.1:6382:1 server3 24 | - 127.0.0.1:6383:1 server4 25 | 26 | gamma: 27 | listen: 127.0.0.1:22123 28 | hash: fnv1a_64 29 | distribution: ketama 30 | timeout: 400 31 | backlog: 1024 32 | preconnect: true 33 | auto_eject_hosts: true 34 | server_retry_timeout: 2000 35 | server_failure_limit: 3 36 | servers: 37 | - 127.0.0.1:11212:1 38 | - 127.0.0.1:11213:1 39 | 40 | delta: 41 | listen: 127.0.0.1:22124 42 | hash: fnv1a_64 43 | distribution: ketama 44 | timeout: 100 45 | auto_eject_hosts: true 46 | server_retry_timeout: 2000 47 | server_failure_limit: 1 48 | servers: 49 | - 127.0.0.1:11214:1 50 | - 127.0.0.1:11215:1 51 | - 127.0.0.1:11216:1 52 | - 127.0.0.1:11217:1 53 | - 127.0.0.1:11218:1 54 | - 127.0.0.1:11219:1 55 | - 127.0.0.1:11220:1 56 | - 127.0.0.1:11221:1 57 | - 127.0.0.1:11222:1 58 | - 127.0.0.1:11223:1 59 | 60 | omega: 61 | listen: /tmp/gamma 62 | hash: hsieh 63 | distribution: ketama 64 | auto_eject_hosts: false 65 | servers: 66 | - 127.0.0.1:11214:100000 67 | - 127.0.0.1:11215:1 68 | -------------------------------------------------------------------------------- /twemproxy/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [ -z "$1" ]; then 6 | exec nutcracker -c ${TWEMPROXY_CONFIG_DIR}/config.yml 7 | else 8 | exec "$@" 9 | fi 10 | -------------------------------------------------------------------------------- /upsource/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mritd/alpine-glibc:3.5 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ENV TZ 'Asia/Shanghai' 6 | 7 | ENV UPSOURCE_VERSION 3.5.3616 8 | 9 | RUN apk upgrade --no-cache \ 10 | && apk add --no-cache bash tzdata wget ca-certificates openjdk8-jre \ 11 | && wget https://download.jetbrains.com/upsource/upsource-${UPSOURCE_VERSION}.zip \ 12 | && unzip upsource-${UPSOURCE_VERSION}.zip \ 13 | && rm -f upsource-${UPSOURCE_VERSION}.zip \ 14 | && mkdir -p /data/{backups,data,logs,tmp} \ 15 | && /upsource-${UPSOURCE_VERSION}/bin/upsource.sh configure \ 16 | --backups-dir /data/backups \ 17 | --data-dir /data/data \ 18 | --logs-dir /data/logs \ 19 | --temp-dir /data/tmp \ 20 | --listen-port 8080 \ 21 | && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 22 | && echo "Asia/Shanghai" > /etc/timezone \ 23 | && apk del wget \ 24 | && rm -rf /var/cache/apk/* 25 | 26 | WORKDIR /upsource-${UPSOURCE_VERSION}/bin 27 | 28 | EXPOSE 8080 29 | 30 | VOLUME /data 31 | 32 | CMD ["./upsource.sh","run"] 33 | -------------------------------------------------------------------------------- /v2ray/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.8 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | ENV V2RAY_VERSION v3.29 9 | ENV V2RAY_LOG_DIR /var/log/v2ray 10 | ENV V2RAY_CONFIG_DIR /etc/v2ray/ 11 | ENV V2RAY_DOWNLOAD_URL https://github.com/v2ray/v2ray-core/releases/download/${V2RAY_VERSION}/v2ray-linux-64.zip 12 | 13 | RUN apk upgrade --update \ 14 | && apk add \ 15 | bash \ 16 | tzdata \ 17 | curl \ 18 | && mkdir -p \ 19 | ${V2RAY_LOG_DIR} \ 20 | ${V2RAY_CONFIG_DIR} \ 21 | /tmp/v2ray \ 22 | && curl -L -H "Cache-Control: no-cache" -o /tmp/v2ray/v2ray.zip ${V2RAY_DOWNLOAD_URL} \ 23 | && unzip /tmp/v2ray/v2ray.zip -d /tmp/v2ray/ \ 24 | && mv /tmp/v2ray/v2ray-${V2RAY_VERSION}-linux-64/v2ray /usr/bin \ 25 | && mv /tmp/v2ray/v2ray-${V2RAY_VERSION}-linux-64/vpoint_vmess_freedom.json /etc/v2ray/config.json \ 26 | && chmod +x /usr/bin/v2ray \ 27 | && apk del curl \ 28 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 29 | && echo ${TZ} > /etc/timezone \ 30 | && rm -rf /tmp/v2ray /var/cache/apk/* 31 | 32 | ADD entrypoint.sh /entrypoint.sh 33 | 34 | ENTRYPOINT ["/entrypoint.sh"] 35 | -------------------------------------------------------------------------------- /v2ray/README.md: -------------------------------------------------------------------------------- 1 | ## v2ray 最新版本 2 | 3 | [![](https://images.microbadger.com/badges/version/mritd/v2ray.svg)](https://microbadger.com/images/mritd/v2ray "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/mritd/v2ray.svg)](https://microbadger.com/images/mritd/v2ray "Get your own image badge on microbadger.com") 4 | 5 | > 截至目前该镜像为 v2ray 3.29 版本 6 | 7 | ### 打开姿势 8 | 9 | ``` sh 10 | docker pull mritd/v2ray 11 | docker run -dt --name v2ray -p 10086:10086 mritd/v2ray 12 | ``` 13 | 14 | **Container 默认监听 10086 端口** 15 | **v2ray 默认 ID 为 `23ad6b10-8d1a-40f7-8ad0-e3e35cd38297`(不保证后期变动)** 16 | 17 | ### 自定义配置 18 | 19 | **镜像支持写入自定义的 v2ray 配置,挂载覆盖 `/etc/v2ray/config.json` 或使用 `-c` 选项并跟上 JSON 字符串即可,如下所示** 20 | 21 | ``` sh 22 | docker run -dt --name v2ray mritd/v2ray -c "{\"log\" : { \"access\": \"/var/log/v2ray/access.log\", \"error\": \"/var/log/v2ray/error.log\", \"loglevel\": \"warning\" }, \"inbound\": { \"port\": 4500, \"protocol\": \"vmess\", \"settings\": { \"clients\": [ { \"id\": \"23ad6b10-8d1a-40f7-8ad0-e3e35cd38297\", \"level\": 1, \"alterId\": 64 } ] } }, \"outbound\": { \"protocol\": \"freedom\", \"settings\": {} }, \"outboundDetour\": [ { \"protocol\": \"blackhole\", \"settings\": {}, \"tag\": \"blocked\" } ], \"routing\": { \"strategy\": \"rules\", \"settings\": { \"rules\": [ { \"type\": \"field\", \"ip\": [ \"0.0.0.0/8\", \"10.0.0.0/8\", \"100.64.0.0/10\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\", \"192.0.2.0/24\", \"192.168.0.0/16\", \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"::1/128\", \"fc00::/7\", \"fe80::/10\" ], \"outboundTag\": \"blocked\" } ] } }, \"transport\": { \"kcpSettings\": { \"uplinkCapacity\": 10, \"downlinkCapacity\": 10 } } }" 23 | ``` 24 | 25 | **`-c` 选项后面的参数就是改好的配置文件中的 JSON 字符串** 26 | **实际上对于怎么处理那个 JSON 中引号懵逼的朋友可以借助 JSON 27 | 在线转换工具 [http://www.bejson.com/zhuanyi/](http://www.bejson.com/zhuanyi/) 完成 JSON 字符串转换** 28 | **也就是说先改好配置,然后将 JSON 复制到上面的网站,选择压缩并转义转换一下, 29 | 最后将压缩并转义后的内容拼接在 `-c` 选项后即可** 30 | **注意: 网站转换完的两边没有双引号,也就是说要 `-c "粘贴压缩并转义后的内容"`** 31 | 32 | ### 样例配置 33 | 34 | **镜像使用官方的样例配置,来源于官方发布包,可执行以下命令获取样例配置** 35 | **具体修改设置请参考 [官方文档配置部分](https://www.v2ray.com/chapter_02/)** 36 | 37 | ``` sh 38 | docker run --rm mritd/v2ray "cat /etc/v2ray/config.json" > config.json 39 | ``` 40 | -------------------------------------------------------------------------------- /v2ray/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CMD=$1 4 | CONFIG=$2 5 | 6 | if [ "$CONFIG" != "" ] && [ "$CMD" == "-c" ]; then 7 | echo "$CONFIG" > /etc/v2ray/config.json 8 | echo -e "\033[32mUse a custom configuration...\033[0m" 9 | fi 10 | 11 | if [ "$CMD" != "" ] && [ "$CMD" != "-c" ]; then 12 | $* 13 | else 14 | v2ray -config /etc/v2ray/config.json 15 | fi 16 | -------------------------------------------------------------------------------- /videovip/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.13.6-alpine 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | RUN apk upgrade --update \ 10 | && apk add bash tzdata \ 11 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 12 | && echo ${TZ} > /etc/timezone \ 13 | && rm -rf /var/cache/apk/* 14 | 15 | COPY vip /usr/share/nginx/html 16 | 17 | CMD ["nginx", "-g", "daemon off;"] 18 | -------------------------------------------------------------------------------- /videovip/vip/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 尊享VIP电影 9 | 86 | 87 | 88 | 89 |
90 |
91 | 102 |
103 | 104 | 105 |
106 |
107 |
108 | 109 |
110 |
111 | 112 | 113 | 165 | 166 | -------------------------------------------------------------------------------- /yearning/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.12 2 | 3 | LABEL maintainer="mritd " 4 | 5 | ARG TZ="Asia/Shanghai" 6 | 7 | ENV TZ ${TZ} 8 | 9 | ENV INSTALL_DIR /opt/yearning 10 | ENV DOWNLOAD_URL https://github.com/cookieY/Yearning/releases/download/v2.2.2/Yearning-2.2.2-4kstars.linux-amd64-patch-1.zip 11 | 12 | WORKDIR ${INSTALL_DIR} 13 | 14 | RUN set -ex \ 15 | && apk upgrade \ 16 | && apk add bash tzdata ca-certificates libc6-compat wget unzip \ 17 | && wget ${DOWNLOAD_URL} -O yearning.zip \ 18 | && unzip yearning.zip \ 19 | && mv Yearning-go/Yearning ./yearning \ 20 | && mv Yearning-go/dist ./dist \ 21 | && mv Yearning-go/conf.toml ./conf.toml \ 22 | && chmod +x ./yearning \ 23 | && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \ 24 | && echo ${TZ} > /etc/timezone \ 25 | && apk del wget unzip \ 26 | && rm -rf Yearning-go yearning.zip __MACOSX /var/cache/apk/* 27 | 28 | EXPOSE 8000 29 | 30 | ENTRYPOINT ["/opt/yearning/yearning"] 31 | 32 | CMD ["-m","-s"] 33 | -------------------------------------------------------------------------------- /zeroclipboard/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | LABEL maintainer="mritd " 4 | 5 | COPY Gemfile Gemfile 6 | 7 | RUN apk upgrade --update \ 8 | && apk add bash build-base libffi zlib libxml2 \ 9 | libxslt ruby ruby-io-console ruby-json yaml \ 10 | nodejs git perl tzdata \ 11 | && apk add --no-cache --virtual .build-deps \ 12 | build-base libffi-dev zlib-dev libxml2-dev \ 13 | libxslt-dev ruby-dev \ 14 | && git clone -b gh-pages https://github.com/zeroclipboard/zeroclipboard.org.git /root/zeroclipboard.org \ 15 | && echo 'gem: --no-document' >> ~/.gemrc \ 16 | && cp ~/.gemrc /etc/gemrc \ 17 | && chmod uog+r /etc/gemrc \ 18 | && echo "gem 'ffi','1.9.18'" >> /root/zeroclipboard.org/Gemfile \ 19 | && echo "gem 'posix-spawn','0.3.13'" >> /root/zeroclipboard.org/Gemfile \ 20 | && gem install bundler \ 21 | && bundle config build.jekyll --no-rdoc \ 22 | && bundle install \ 23 | && cd /root/zeroclipboard.org \ 24 | && rm -f Gemfile.lock \ 25 | && bundle install \ 26 | && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 27 | && echo "Asia/Shanghai" > /etc/timezone \ 28 | && apk del .build-deps \ 29 | && rm -f /Gemfile* \ 30 | && rm -rf /var/cache/apk/* \ 31 | && rm -rf /usr/lib/lib/ruby/gems/*/cache/* \ 32 | && rm -rf ~/.gem 33 | 34 | WORKDIR /root/zeroclipboard.org 35 | 36 | CMD ["jekyll","serve","-H","0.0.0.0"] 37 | -------------------------------------------------------------------------------- /zeroclipboard/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | require 'json' 4 | require 'open-uri' 5 | versions = JSON.parse(open('https://pages.github.com/versions.json').read) 6 | 7 | gem 'jekyll', versions['jekyll'] 8 | gem 'jekyll-sass-converter', versions['jekyll-sass-converter'] 9 | gem 'kramdown', versions['kramdown'] 10 | gem 'liquid', versions['liquid'] 11 | gem 'rouge', versions['rouge'] 12 | gem 'jemoji', versions['jemoji'] 13 | gem 'jekyll-mentions', versions['jekyll-mentions'] 14 | gem 'jekyll-redirect-from', versions['jekyll-redirect-from'] 15 | gem 'jekyll-sitemap', versions['jmekyll-sitemap'] 16 | gem 'jekyll-feed', versions['jekyll-feed'] 17 | gem 'jekyll-gist', versions['jekyll-gist'] 18 | gem 'jekyll-paginate', versions['jekyll-paginate'] 19 | gem 'github-pages-health-check', versions['github-pages-health-check'] 20 | gem 'jekyll-coffeescript', versions['jekyll-coffeescript'] 21 | gem 'jekyll-seo-tag', versions['jekyll-seo-tag'] 22 | gem 'github-pages', versions['github-pages'] 23 | gem 'jekyll-github-metadata', versions['jekyll-github-metadata'] 24 | gem 'html-pipeline', versions['html-pipeline'] 25 | gem 'listen', versions['listen'] 26 | gem 'sass', versions['sass'] 27 | gem 'safe_yaml', versions['safe_yaml'] 28 | gem 'html-proofer' 29 | --------------------------------------------------------------------------------