├── .gitignore ├── Dockerfile ├── prepare.sh ├── entrypoint.sh ├── .github └── workflows │ └── docker-image.yml ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | server-data 3 | build.sh 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG JAVA_VERSION=11 2 | 3 | FROM amazoncorretto:$JAVA_VERSION 4 | 5 | ENV RAM_MAX=4G 6 | ENV RAM_MIN=1G 7 | 8 | RUN mkdir -p /minecraft/data \ 9 | && yum install -y unzip curl jq \ 10 | && yum clean all \ 11 | && rm -rf /var/cache/yum 12 | 13 | WORKDIR /minecraft 14 | 15 | ARG MINECRAFT_VERSION 16 | ARG FORGE_VERSION 17 | ARG PACK_NAME 18 | ARG PACK_VERSION 19 | ARG DOWNLOAD_URL 20 | ARG PROJECTID_IGNORE 21 | 22 | ENV DOWNLOAD_URL=$DOWNLOAD_URL 23 | ENV FORGE_VERSION=$MINECRAFT_VERSION-$FORGE_VERSION 24 | ENV PROJECTID_IGNORE=$PROJECTID_IGNORE 25 | ENV RAM_MAX=4G 26 | ENV RAM_MIN=1G 27 | 28 | LABEL MINECRAFT_VERSION=$MINECRAFT_VERSION \ 29 | FORGE_VERSION=$FORGE_VERSION \ 30 | PACK_NAME=$PACK_NAME \ 31 | PACK_VERSION=$PACK_VERSION 32 | 33 | COPY entrypoint.sh prepare.sh /minecraft/ 34 | 35 | RUN echo "Downloading server files from ${DOWNLOAD_URL}" \ 36 | && curl -sSL "${DOWNLOAD_URL}" -o serverfiles.zip \ 37 | && unzip serverfiles.zip \ 38 | && rm serverfiles.zip \ 39 | && bash prepare.sh 40 | 41 | RUN echo "Download Forge version ${FORGE_VERSION}" \ 42 | && curl -sSL "http://files.minecraftforge.net/maven/net/minecraftforge/forge/${FORGE_VERSION}/forge-${FORGE_VERSION}-installer.jar" -o forge-installer.jar \ 43 | && java -jar forge-installer.jar --installServer \ 44 | && rm forge-installer.jar forge-installer.jar.log 45 | 46 | ENTRYPOINT ["/bin/bash"] 47 | CMD ["entrypoint.sh"] 48 | -------------------------------------------------------------------------------- /prepare.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Check if manifest.json exists, exit if it does not exist 4 | if [ ! -f "manifest.json" ]; then 5 | echo "## No manifest.json found, probably no files to download.." 6 | exit 0 7 | fi 8 | 9 | OVERRIDES_DIR=$(cat manifest.json | jq -r .overrides) 10 | 11 | if [ ! -z "${OVERRIDES_DIR}" ] && [ "${OVERRIDES_DIR}" != "null" ] && [ -d "./${OVERRIDES_DIR}" ]; then 12 | mv "./${OVERRIDES_DIR}/"* ./ 13 | rm -r "./${OVERRIDES_DIR}" 14 | fi 15 | 16 | if [ ! -z "${PROJECTID_IGNORE}" ]; then 17 | echo "${PROJECTID_IGNORE}" > projectid.ignore 18 | fi 19 | 20 | ## Function to download mod files from manifest.json 21 | function downloadFile { 22 | if [[ $# != 2 ]]; then 23 | echo "Not enough arguments to download file" 24 | return 25 | fi 26 | 27 | ADDONID=${1} 28 | FILEID=${2} 29 | 30 | if [ -f ./projectid.ignore ] && grep -q "${ADDONID}" ./projectid.ignore; then 31 | echo "Ignoring addon with id ${ADDONID}" 32 | return 33 | fi 34 | 35 | ## Change to mods directory 36 | cd mods 37 | 38 | ## Get download url for mod file 39 | MOD_FILE_URL=$(curl -sL "https://addons-ecs.forgesvc.net/api/v2/addon/${ADDONID}/file/${FILEID}/download-url") 40 | 41 | echo "# Downloading mods/$(basename "$MOD_FILE_URL")" 42 | curl -sSLOJ "$MOD_FILE_URL" 43 | } 44 | 45 | ## Make downloadFile function accessible for xargs call 46 | export -f downloadFile 47 | 48 | # Create mods directory if it does not exist 49 | [ ! -d "mods" ] && mkdir "mods" 50 | 51 | # Download all mod files to mods directory 52 | cat manifest.json | \ 53 | jq -r '.files[] | (.projectID|tostring) + " " + (.fileID|tostring)' | \ 54 | xargs -n 1 -P 10 -I {} bash -c 'downloadFile $@' _ {} 55 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ ! $EULA == 'true' ]]; then 4 | echo "You have not yet agreed to the EULA." 5 | echo "By setting the environment variable \"EULA=true\" you are indicating your agreement to the EULA (https://account.mojang.com/documents/minecraft_eula)." 6 | exit 1 7 | fi 8 | 9 | if [ ! -f "eula.txt" ] || ! grep -q "eula=true" eula.txt; then 10 | echo "#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)." > eula.txt 11 | echo "#$(date +'%a %b %d %H:%M:%S %Z %Y')" >> eula.txt 12 | echo "eula=true" >> eula.txt 13 | fi 14 | 15 | exec java -Xmx"${RAM_MAX}" \ 16 | -Xms"${RAM_MIN}" \ 17 | -XX:+UseG1GC \ 18 | -XX:+ParallelRefProcEnabled \ 19 | -XX:MaxGCPauseMillis=200 \ 20 | -XX:+UnlockExperimentalVMOptions \ 21 | -XX:+DisableExplicitGC \ 22 | -XX:-OmitStackTraceInFastThrow \ 23 | -XX:+AlwaysPreTouch \ 24 | -XX:G1NewSizePercent=30 \ 25 | -XX:G1MaxNewSizePercent=40 \ 26 | -XX:G1HeapRegionSize=8M \ 27 | -XX:G1ReservePercent=20 \ 28 | -XX:G1HeapWastePercent=5 \ 29 | -XX:G1MixedGCCountTarget=8 \ 30 | -XX:InitiatingHeapOccupancyPercent=15 \ 31 | -XX:G1MixedGCLiveThresholdPercent=90 \ 32 | -XX:G1RSetUpdatingPauseTimePercent=5 \ 33 | -XX:SurvivorRatio=32 \ 34 | -XX:MaxTenuringThreshold=1 \ 35 | -Dusing.aikars.flags=true \ 36 | -Daikars.new.flags=true \ 37 | -jar "forge-${FORGE_VERSION}.jar" \ 38 | --nogui \ 39 | --universe ./data \ 40 | --port ${SERVER_PORT:-25565} \ 41 | --world ${WORLD_NAME:-world} 42 | -------------------------------------------------------------------------------- /.github/workflows/docker-image.yml: -------------------------------------------------------------------------------- 1 | name: Build and Publish 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | javaVersion: 7 | description: 'Java version' 8 | required: true 9 | default: 8 10 | minecraftVersion: 11 | description: 'Minecraft version' 12 | required: true 13 | forgeVersion: 14 | description: 'Forge version' 15 | required: true 16 | default: '14.23.5.2854' 17 | name: 18 | description: 'Modpack name' 19 | required: true 20 | version: 21 | description: 'Modpack version' 22 | required: true 23 | downloadUrl: 24 | description: 'Modpack server download url' 25 | required: true 26 | projectIdIgnore: 27 | description: 'Comma-separated list of mod project ids to ignore' 28 | required: true 29 | 30 | jobs: 31 | build: 32 | env: 33 | JAVA_VERSION: ${{ github.event.inputs.javaVersion }} 34 | MINECRAFT_VERSION: ${{ github.event.inputs.minecraftVersion }} 35 | FORGE_VERSION: ${{ github.event.inputs.forgeVersion }} 36 | PACK_NAME: ${{ github.event.inputs.name }} 37 | PACK_VERSION: ${{ github.event.inputs.version }} 38 | DOWNLOAD_URL: ${{ github.event.inputs.downloadUrl }} 39 | PROJECTID_IGNORE: ${{ github.event.inputs.projectIdIgnore }} 40 | runs-on: ubuntu-latest 41 | steps: 42 | - name: Check out repository 43 | uses: actions/checkout@v2 44 | 45 | - name: Login to Docker Hub 46 | uses: docker/login-action@v1 47 | with: 48 | username: ${{ secrets.DOCKERHUB_USERNAME }} 49 | password: ${{ secrets.DOCKERHUB_TOKEN }} 50 | 51 | - name: Login to Github Container Registry 52 | uses: docker/login-action@v1 53 | with: 54 | registry: ghcr.io 55 | username: ${{ secrets.GHCR_USERNAME }} 56 | password: ${{ secrets.GHCR_TOKEN }} 57 | 58 | - name: Build image 59 | run: | 60 | docker build . \ 61 | -t curseforge/${PACK_NAME}:${PACK_VERSION} \ 62 | -t curseforge/${PACK_NAME}:latest \ 63 | --build-arg JAVA_VERSION \ 64 | --build-arg MINECRAFT_VERSION \ 65 | --build-arg FORGE_VERSION \ 66 | --build-arg PACK_NAME \ 67 | --build-arg PACK_VERSION \ 68 | --build-arg DOWNLOAD_URL \ 69 | --build-arg PROJECTID_IGNORE 70 | 71 | - name: Push to Docker Hub 72 | run: | 73 | docker push curseforge/${PACK_NAME}:${PACK_VERSION} 74 | docker push curseforge/${PACK_NAME}:latest 75 | 76 | - name: Push to Github Container Registry 77 | run: | 78 | docker tag curseforge/${PACK_NAME}:${PACK_VERSION} ghcr.io/curseforge-docker/${PACK_NAME}:${PACK_VERSION} 79 | docker tag curseforge/${PACK_NAME}:${PACK_VERSION} ghcr.io/curseforge-docker/${PACK_NAME}:latest 80 | docker push ghcr.io/curseforge-docker/${PACK_NAME}:${PACK_VERSION} 81 | docker push ghcr.io/curseforge-docker/${PACK_NAME}:latest 82 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Minecraft Modpack Docker Images 2 | 3 | ![Build and Publish](https://github.com/curseforge-docker/modpack-servers/workflows/Build%20and%20Publish/badge.svg) 4 | 5 | This repository contains ready-to-use docker images for some of the most popular Minecraft Modpacks, such as _All the Mods 6_, _RLCraft_ and _SkyFactory 4_. 6 | 7 | ## Usage 8 | 9 | To simply use the latest version of a modpack (e.g. `all-the-mods-6`), run 10 | ```console 11 | docker run -d --name minecraft-server -p 25565:25565 -e EULA=true curseforge/all-the-mods-6 12 | ``` 13 | To get a list of all available Modpacks, see [List of available modpacks](#list-of-available-modpacks). 14 | 15 | > _It is important to always add `-e EULA=true` id the docker commands as Mojang/Microsoft requires EULA acceptance._ 16 | 17 | If you want others to join you or this image runs on a server, you need to open the port 25565 (TCP) on your firewall. 18 | 19 | To know more regarding the usage of docker, head over to the [Docker CLI reference](https://docs.docker.com/engine/reference/commandline/docker/) 20 | 21 | ### Resource allocation and limiting 22 | 23 | Running Forge modpack servers requires way too much resources (RAM, CPU etc). 24 | **This will be a problem** if your host machine has limited (or outdated) CPU or RAM. 25 | 26 | Please read the information below before changing any of the resource limits or allocation configurations. 27 | 28 | #### Java Heap space allocation 29 | 30 | Running the Minecraft Java Edition server, requires the server to be run through a JAVA VM on the hosting machine. 31 | Currently we default to using a minimum allocation of `1G` and a maximum of `4G` RAM. 32 | 33 | The default values can be overridden by using the `-e` (aka. `--env`) flag to set the environment 34 | variables `RAM_MIN` and `RAM_MAX` to the appropriate limits for your server. 35 | 36 | **Please note!** We do not recommend going any lower than the default values for any modpack! 37 | 38 | #### Docker resource limits 39 | 40 | As a part of docker, you can configure the "Runtime constraints on resources", this is well documented in the Docker documentation here: 41 | https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources 42 | 43 | ### Docker Compose 44 | 45 | ``` 46 | # docker-compose.yml 47 | version: "3.7" 48 | services: 49 | atm6: 50 | image: curseforge/all-the-mods-6 51 | environment: 52 | - EULA=true 53 | volumes: 54 | - /var/lib/minecraft-atm6/world:/minecraft/world 55 | - /var/lib/minecraft-atm6/backups:/minecraft/backups 56 | ports: 57 | - 25565:25565 58 | restart: unless-stopped 59 | ``` 60 | 61 | ### Volumes 62 | 63 | In order to persist your data (e.g. in case of a modpack update), you need to mount docker volumes. 64 | __It is strongly recommended to do so, otherwise you wight loose your data, like the world and server settings!__ 65 | 66 | ```console 67 | docker run \ 68 | -v /var/lib/minecraft-atm6/world:/minecraft/world \ 69 | -v /var/lib/minecraft-atm6/backups:/minecraft/backups \ 70 | ... 71 | ``` 72 | 73 | You can add other files like the `server.properties`, the `ops.json` and the `whitelist.json` as well. 74 | 75 | ### Image hosting 76 | 77 | All container images are hosted on Docker Hub as well as in the Github Container Registry. 78 | Docker Hub 79 | ```console 80 | docker pull curseforge/all-the-mods-6:1.4.1 81 | ``` 82 | Github Container Registry 83 | ```console 84 | docker pull ghcr.io/curseforge-docker/all-the-mods-6:1.4.1 85 | ``` 86 | ## List of available modpacks 87 | | Modpack | GitHub | Docker Hub 88 | | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 89 | | [RLCraft](https://www.curseforge.com/minecraft/modpacks/rlcraft) | - | [2.8.2](https://hub.docker.com/layers/curseforge/rlcraft/2.8.2/images/sha256-fa373662ba8f731509f50e6a3e29cc9340f7f3cf2e3fa5337c9e6277ca1fab57?context=explore) 90 | | [All the Mods 6](https://www.curseforge.com/minecraft/modpacks/all-the-mods-6) | [1.4.1](https://github.com/orgs/curseforge-docker/packages/container/all-the-mods-6/1142098) | [1.5.0](https://hub.docker.com/layers/curseforge/all-the-mods-6/1.5.0/images/sha256-4f8cad9873af452757d6f07203b7af6e951ce60bd6a59e4c0f5572aba962d8e3?context=explore) [1.4.1](https://hub.docker.com/layers/curseforge/all-the-mods-6/1.4.1/images/sha256-cd5d74dfb422fadec278fc45074603634879c97b7a9ab8e3474cf3939a027b21?context=explore) 91 | | [SkyFactory 4](https://www.curseforge.com/minecraft/modpacks/skyfactory-4) | - | [4.2.2](https://hub.docker.com/layers/curseforge/skyfactory-4/4.2.2/images/sha256-713c867f5b4b8ca50fe8a567f6dee85a943b7fcae32efe9d0bb3c1042e38c87f?context=explore) 92 | 93 | _Currently we do not have a `latest` tag for the docker containers, you will therefore always need to specify the server version you need._ 94 | 95 | ## Contribution 96 | 97 | Please feel free to create pull requests and write about your issues here on GitHub. Constuctive Feedback is always a nice reward for our work. Though, if you are having trouble using docker or something is wrong with the modpack, please either read the docker documentation or refer to the modpack author(s). 98 | 99 | ## The credit goes to ... 100 | 101 | ... whoever works on building the modpacks! 102 | 103 | We only make them more available for users who want to host their own servers. 104 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------