├── .gitignore ├── issue_template.md ├── entrypoint.sh ├── README.md ├── dockerfiles └── centos │ └── Dockerfile ├── pull_request_template.md ├── LICENSE ├── asgardio.Dockerfile ├── Dockerfile ├── support.bionic.Dockerfile ├── focal.Dockerfile └── bionic.Dockerfile /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | 25 | # Mac OS 26 | *.DS_Store 27 | -------------------------------------------------------------------------------- /issue_template.md: -------------------------------------------------------------------------------- 1 | **Description:** 2 | 3 | 4 | **Suggested Labels:** 5 | 6 | 7 | **Suggested Assignees:** 8 | 9 | 10 | **Affected Product Version:** 11 | 12 | **OS, DB, other environment details and versions:** 13 | 14 | **Steps to reproduce:** 15 | 16 | 17 | **Related Issues:** 18 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export USER_ID=${LOCAL_USER_ID:-2000} 4 | export GROUP_ID=${LOCAL_GROUP_ID:-2000} 5 | 6 | groupadd -g $GROUP_ID -r jenkins 7 | useradd -u $USER_ID -g $GROUP_ID -d /home/jenkins -s /bin/sh -g jenkins jenkins 8 | echo "jenkins:jenkins" | chpasswd 9 | 10 | chown -R jenkins:jenkins /home/jenkins 11 | 12 | chown -R jenkins:jenkins /build/software/maven 13 | 14 | chown -R jenkins:jenkins /build/gpg-keys/.gnupg 15 | 16 | 17 | if [[ $# -eq 1 ]]; then 18 | 19 | # if `docker run` only has one arguments, we assume user is running alternate command like `bash` to inspect the image 20 | exec "$@" 21 | 22 | else 23 | 24 | # if -tunnel is not provided try env vars 25 | if [[ "$@" != *"-tunnel "* ]]; then 26 | if [[ ! -z "$JENKINS_TUNNEL" ]]; then 27 | TUNNEL="-tunnel $JENKINS_TUNNEL" 28 | fi 29 | fi 30 | 31 | if [[ ! -z "$JENKINS_URL" ]]; then 32 | URL="-url $JENKINS_URL" 33 | fi 34 | 35 | exec java $JAVA_OPTS -Duser.home=/home/jenkins -cp /usr/share/jenkins/slave.jar hudson.remoting.jnlp.Main -headless $TUNNEL $URL "$@" 36 | fi 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wso2-jenkins-slave 2 | 3 | WSO2 Jenkins docker container based builds are run on a Docker image built with this Dockerfile. 4 | Here, with the help of Jenkins Docker plugin, dynamically slave containers are spawned for each build 5 | and destroyed after the build. 6 | 7 | * Download and place `jdk-8u131-linux-x64.tar.gz` and `jdk-7u51-linux-x64.tar.gz` in the same folder as the `Dockerfile`. These can be downloaded via http://www.oracle.com/technetwork/java/javase/archive-139210.html. 8 | 9 | * Build the docker image via the command 10 | 11 | `docker build -t wso2-jenkins-slave:latest -t wso2-jenkins-slave:1.11 .` 12 | 13 | If you are connecting to the docker instance remotely, then set the docker host info and the `--tlsverfify` flag. 14 | 15 | `docker -H=127.0.0.1:2376 --tlsverify build -t wso2-jenkins-slave:latest -t wso2-jenkins-slave:1.0 .` 16 | 17 | Now, you have the docker image added to your local docker instance. 18 | 19 | * If you have a docker registry, then you can push the newly built docker image there such that your other builds can use it. This is optional. Otherwise, you can go to each VM, and build the docker image. 20 | * Login to the docker registry 21 | 22 | `docker login mydockerhub.example.com` 23 | 24 | * Name your docker image appropriately 25 | 26 | `docker tag wso2-jenkins-slave:1.0 mydockerhub.example.com/kasung-wso2-jenkins-slave` 27 | 28 | * Now, push the image to your docker registry 29 | 30 | `docker push mydockerhub.example.com/kasung-wso2-jenkins-slave` 31 | 32 | * Once that is done, go to VMs that you are going to use for docker-based Jenkins builds. Run the following command to pull the newly created docker image. 33 | 34 | `docker pull mydockerhub.example.com/kasung-wso2-jenkins-slave` 35 | -------------------------------------------------------------------------------- /dockerfiles/centos/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 4 | # 5 | # This software is the property of WSO2 Inc. and its suppliers, if any. 6 | # Dissemination of any information or reproduction of any material contained 7 | # herein is strictly forbidden, unless permitted by WSO2 in accordance with 8 | # the WSO2 Commercial License available at http://wso2.com/licenses. 9 | 10 | # For specific language governing the permissions and limitations under this 11 | # license, please see the license as well as any agreement you’ve entered into 12 | # with WSO2 governing the purchase of this software and any associated services. 13 | # ------------------------------------------------------------------------------ 14 | 15 | # set base Docker image to adoptopenjdk CentOS Docker image 16 | FROM adoptopenjdk/openjdk8:x86_64-centos-jdk8u252-b09 17 | LABEL maintainer="WSO2 Docker Maintainers " 18 | 19 | # install required packages 20 | RUN \ 21 | yum -y update \ 22 | && yum install -y \ 23 | rpm-build \ 24 | sudo \ 25 | git \ 26 | unzip \ 27 | wget \ 28 | && rm -rf /var/cache/yum/* 29 | 30 | RUN \ 31 | echo "net.ipv4.ip_local_port_range=15000 61000" >> /etc/sysctl.conf \ 32 | && echo "net.ipv4.tcp_fin_timeout=30" >> /etc/sysctl.conf \ 33 | && echo "* soft nofile 65535" >> /etc/security/limits.conf \ 34 | && echo "* hard nofile 65535" >> /etc/security/limits.conf \ 35 | && echo "* soft nproc 65535" >> /etc/security/limits.conf \ 36 | && echo "* hard nproc 65535" >> /etc/security/limits.conf 37 | 38 | RUN \ 39 | mkdir -p /home/jenkins 40 | 41 | ARG JENKINS_REMOTING_VERSION=3.5 42 | 43 | # See https://github.com/jenkinsci/docker-slave/blob/2.62/Dockerfile#L32 44 | RUN curl --create-dirs -sSLo /usr/share/jenkins/slave.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/$JENKINS_REMOTING_VERSION/remoting-$JENKINS_REMOTING_VERSION.jar \ 45 | && chmod 755 /usr/share/jenkins \ 46 | && chmod 644 /usr/share/jenkins/slave.jar \ 47 | && chmod a+rwx /home/jenkins 48 | 49 | EXPOSE 22 50 | 51 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 52 | 53 | ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] 54 | 55 | CMD ["/usr/sbin/sshd", "-D"] 56 | -------------------------------------------------------------------------------- /pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Purpose 2 | > Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc. 3 | 4 | ## Goals 5 | > Describe the solutions that this feature/fix will introduce to resolve the problems described above 6 | 7 | ## Approach 8 | > Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here. 9 | 10 | ## User stories 11 | > Summary of user stories addressed by this change> 12 | 13 | ## Release note 14 | > Brief description of the new feature or bug fix as it will appear in the release notes 15 | 16 | ## Documentation 17 | > Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact 18 | 19 | ## Training 20 | > Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable 21 | 22 | ## Certification 23 | > Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why. 24 | 25 | ## Marketing 26 | > Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable 27 | 28 | ## Automation tests 29 | - Unit tests 30 | > Code coverage information 31 | - Integration tests 32 | > Details about the test cases and coverage 33 | 34 | ## Security checks 35 | - Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no 36 | - Ran FindSecurityBugs plugin and verified report? yes/no 37 | - Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no 38 | 39 | ## Samples 40 | > Provide high-level details about the samples related to this feature 41 | 42 | ## Related PRs 43 | > List any other related PRs 44 | 45 | ## Migrations (if applicable) 46 | > Describe migration steps and platforms on which migration has been tested 47 | 48 | ## Test environment 49 | > List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested 50 | 51 | ## Learning 52 | > Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /asgardio.Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2020 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | 17 | # ------------------------------------------------------------------------ 18 | 19 | FROM ubuntu:bionic 20 | 21 | RUN \ 22 | apt-get -q update \ 23 | && apt-get install -y \ 24 | ant \ 25 | curl \ 26 | dbus-x11 \ 27 | git \ 28 | openssh-server \ 29 | software-properties-common \ 30 | ttf-ancient-fonts \ 31 | unzip \ 32 | wget \ 33 | xvfb \ 34 | zip \ 35 | && apt-get clean \ 36 | && rm -rf /var/lib/apt/lists/* \ 37 | && mkdir /var/run/sshd 38 | 39 | RUN \ 40 | mkdir -p /build/software/maven \ 41 | && wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz \ 42 | && tar -xvzf /build/software/maven/apache-maven-3.0.5-bin.tar.gz --directory /build/software/maven \ 43 | && rm /build/software/maven/apache-maven-3.0.5-bin.tar.gz 44 | 45 | RUN \ 46 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz \ 47 | && tar -xvzf /build/software/maven/apache-maven-3.2.2-bin.tar.gz --directory /build/software/maven \ 48 | && rm /build/software/maven/apache-maven-3.2.2-bin.tar.gz 49 | 50 | RUN \ 51 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz \ 52 | && tar -xvzf /build/software/maven/apache-maven-3.3.9-bin.tar.gz --directory /build/software/maven \ 53 | && rm /build/software/maven/apache-maven-3.3.9-bin.tar.gz 54 | 55 | RUN \ 56 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz \ 57 | && tar -xvzf /build/software/maven/apache-maven-3.5.4-bin.tar.gz --directory /build/software/maven \ 58 | && rm /build/software/maven/apache-maven-3.5.4-bin.tar.gz 59 | 60 | RUN \ 61 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-2/2.2.1/binaries/apache-maven-2.2.1-bin.tar.gz \ 62 | && tar -xvzf /build/software/maven/apache-maven-2.2.1-bin.tar.gz --directory /build/software/maven \ 63 | && rm /build/software/maven/apache-maven-2.2.1-bin.tar.gz 64 | 65 | RUN mkdir -p /build/software/java 66 | 67 | COPY OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz /build/software/java 68 | 69 | RUN \ 70 | tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz --directory /build/software/java \ 71 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz 72 | 73 | RUN \ 74 | wget -P /build/software/java https://d3pxv6yz143wms.cloudfront.net/11.0.4.11.1/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz \ 75 | && tar -xvzf /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz --directory /build/software/java \ 76 | && rm /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz 77 | 78 | RUN \ 79 | wget -P /build/software/java https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz \ 80 | && tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz --directory /build/software/java \ 81 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz 82 | 83 | COPY jdk-8u171-linux-x64.tar.gz /build/software/java 84 | 85 | RUN \ 86 | tar -xvzf /build/software/java/jdk-8u171-linux-x64.tar.gz --directory /build/software/java \ 87 | && rm /build/software/java/jdk-8u171-linux-x64.tar.gz \ 88 | && mkdir -p /build/software/jce \ 89 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 90 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 91 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy-original.jar \ 92 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy-original.jar \ 93 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 94 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 95 | && rm /build/software/jce/jce_policy-8.zip \ 96 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 97 | 98 | COPY jdk-8u144-linux-x64.tar.gz /build/software/java 99 | 100 | RUN \ 101 | tar -xvzf /build/software/java/jdk-8u144-linux-x64.tar.gz --directory /build/software/java \ 102 | && rm /build/software/java/jdk-8u144-linux-x64.tar.gz \ 103 | && mkdir -p /build/software/jce \ 104 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 105 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 106 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy-original.jar \ 107 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy-original.jar \ 108 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 109 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 110 | && rm /build/software/jce/jce_policy-8.zip \ 111 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 112 | 113 | COPY jdk-8u45-linux-x64.tar.gz /build/software/java 114 | 115 | RUN \ 116 | tar -xvzf /build/software/java/jdk-8u45-linux-x64.tar.gz --directory /build/software/java \ 117 | && rm /build/software/java/jdk-8u45-linux-x64.tar.gz \ 118 | && mkdir -p /build/software/jce \ 119 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 120 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 121 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy-original.jar \ 122 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy-original.jar \ 123 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 124 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 125 | && rm /build/software/jce/jce_policy-8.zip \ 126 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 127 | 128 | RUN \ 129 | add-apt-repository ppa:openjdk-r/ppa -y \ 130 | && apt-get update \ 131 | && apt-get install -y \ 132 | openjdk-8-jdk \ 133 | && apt-get clean \ 134 | && rm -rf /var/lib/apt/lists/* 135 | 136 | RUN \ 137 | wget -P /build/software/nodejs https://nodejs.org/dist/v8.8.1/node-v8.8.1-linux-x64.tar.xz \ 138 | && tar -xvf /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz --directory /build/software/nodejs \ 139 | && rm /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz 140 | 141 | RUN \ 142 | wget -P /build/software/nodejs https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz \ 143 | && tar -xvf /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz --directory /build/software/nodejs \ 144 | && rm /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz 145 | 146 | RUN wget -P /build/software/go https://dl.google.com/go/go1.10.linux-amd64.tar.gz \ 147 | && tar -xzf /build/software/go/go1.10.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.10 && rm /build/software/go/go1.10.linux-amd64.tar.gz 148 | 149 | RUN wget -P /build/software/go https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz \ 150 | && tar -xzf /build/software/go/go1.12.5.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.12.5 && rm /build/software/go/go1.12.5.linux-amd64.tar.gz 151 | 152 | RUN wget -P /build/software/go https://dl.google.com/go/go1.13.linux-amd64.tar.gz \ 153 | && tar -xzf /build/software/go/go1.13.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.13 && rm /build/software/go/go1.13.linux-amd64.tar.gz 154 | 155 | ENV GOPATH /build/software/go/go 156 | ENV PATH $GOPATH/bin:/build/software/go/go-1.12.5/bin:$PATH 157 | ENV PATH $GOPATH/bin:/build/software/go/go-1.13/bin:$PATH 158 | RUN mkdir -p "$GOPATH/src/github.com/wso2" "$GOPATH/bin" && chmod -R 777 "$GOPATH" 159 | RUN curl https://glide.sh/get | sh 160 | 161 | ENV LC_ALL=C.UTF-8 162 | ENV LANG=C.UTF-8 163 | 164 | RUN \ 165 | apt-get update \ 166 | && apt-get -y install \ 167 | python3-pip \ 168 | && pip3 --version \ 169 | && apt-get -y install \ 170 | build-essential \ 171 | python3-dev \ 172 | && pip3 install mkdocs==1.0.4 \ 173 | && mkdocs --version \ 174 | && pip3 install mkdocs-material==4.4.0 \ 175 | && pip3 install pygments==2.4.2 \ 176 | && apt-get -y install jq 177 | 178 | RUN \ 179 | apt-get update \ 180 | && apt-get -y install \ 181 | python-pip \ 182 | && pip --version \ 183 | && apt-get install -y \ 184 | libxml2-dev \ 185 | libxslt-dev \ 186 | && pip3 install \ 187 | beautifulsoup4 \ 188 | && apt-get install -y \ 189 | python-lxml 190 | 191 | RUN \ 192 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \ 193 | && tar -xvzf /build/software/maven/apache-maven-3.6.3-bin.tar.gz --directory /build/software/maven \ 194 | && rm /build/software/maven/apache-maven-3.6.3-bin.tar.gz 195 | 196 | COPY jdk-8u221-linux-x64.tar.gz /build/software/java 197 | 198 | RUN \ 199 | tar -xvzf /build/software/java/jdk-8u221-linux-x64.tar.gz --directory /build/software/java \ 200 | && rm /build/software/java/jdk-8u221-linux-x64.tar.gz \ 201 | && mkdir -p /build/software/jce \ 202 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 203 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 204 | && mv /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/local_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/local_policy-original.jar \ 205 | && mv /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/US_export_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/US_export_policy-original.jar \ 206 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/ \ 207 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/ \ 208 | && rm /build/software/jce/jce_policy-8.zip \ 209 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 210 | 211 | ENV JAVA_HOME /build/software/java/jdk1.8.0_221 212 | 213 | RUN \ 214 | wget -P /build/software/android https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip \ 215 | && unzip /build/software/android/sdk-tools-linux-4333796.zip -d /build/software/android/ \ 216 | && rm /build/software/android/sdk-tools-linux-4333796.zip \ 217 | && yes | /build/software/android/tools/bin/sdkmanager --licenses \ 218 | && chmod 777 -R /build/software/android/ \ 219 | && unset JAVA_HOME 220 | 221 | ENV ANDROID_HOME /build/software/android 222 | 223 | RUN rm /usr/bin/java \ 224 | && ln -s /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java /usr/bin/java 225 | 226 | RUN \ 227 | echo "net.ipv4.ip_local_port_range=15000 61000" >> /etc/sysctl.conf \ 228 | && echo "net.ipv4.tcp_fin_timeout=30" >> /etc/sysctl.conf \ 229 | && echo "* soft nofile 65535" >> /etc/security/limits.conf \ 230 | && echo "* hard nofile 65535" >> /etc/security/limits.conf \ 231 | && echo "* soft nproc 65535" >> /etc/security/limits.conf \ 232 | && echo "* hard nproc 65535" >> /etc/security/limits.conf 233 | 234 | RUN \ 235 | mkdir -p /home/jenkins 236 | 237 | RUN mkdir -p /build/gpg-keys/.gnupg 238 | ADD .gnupg /build/gpg-keys/.gnupg 239 | 240 | ARG JENKINS_REMOTING_VERSION=3.5 241 | 242 | # See https://github.com/jenkinsci/docker-slave/blob/2.62/Dockerfile#L32 243 | RUN curl --create-dirs -sSLo /usr/share/jenkins/slave.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/$JENKINS_REMOTING_VERSION/remoting-$JENKINS_REMOTING_VERSION.jar \ 244 | && chmod 755 /usr/share/jenkins \ 245 | && chmod 644 /usr/share/jenkins/slave.jar \ 246 | && chmod a+rwx /home/jenkins 247 | 248 | # Install Docker Engine 249 | RUN apt-get update && \ 250 | apt-get -y install apt-transport-https \ 251 | ca-certificates \ 252 | curl \ 253 | gnupg2 \ 254 | software-properties-common && \ 255 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \ 256 | add-apt-repository \ 257 | "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \ 258 | $(lsb_release -cs) \ 259 | stable" && \ 260 | apt-get update && \ 261 | apt-get -y install docker-ce 262 | 263 | # Install Docker Compose 264 | RUN curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose 265 | 266 | # Allow Docker deamon to run as a non-root user 267 | RUN usermod -aG docker "$(whoami)" 268 | 269 | EXPOSE 22 270 | 271 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 272 | 273 | ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] 274 | 275 | CMD ["/usr/sbin/sshd", "-D"] 276 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2016 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | 17 | # ------------------------------------------------------------------------ 18 | 19 | FROM ubuntu:trusty 20 | 21 | RUN \ 22 | apt-get -q update && apt-get install -y openssh-server software-properties-common git ant curl zip unzip xvfb dbus-x11 ttf-ancient-fonts \ 23 | && apt-get clean \ 24 | && rm -rf /var/lib/apt/lists/* \ 25 | && mkdir /var/run/sshd 26 | 27 | 28 | RUN \ 29 | apt-get update \ 30 | && apt-get --yes --force-yes install firefox \ 31 | && apt-get --yes --force-yes install firefox=28.0+build2-0ubuntu2 \ 32 | && apt-mark hold firefox \ 33 | && apt-get clean \ 34 | && rm -rf /var/lib/apt/lists/* 35 | 36 | RUN \ 37 | mkdir -p /build/software/maven \ 38 | && wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz \ 39 | && tar -xvzf /build/software/maven/apache-maven-3.0.5-bin.tar.gz --directory /build/software/maven \ 40 | && rm /build/software/maven/apache-maven-3.0.5-bin.tar.gz 41 | 42 | RUN \ 43 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz \ 44 | && tar -xvzf /build/software/maven/apache-maven-3.2.2-bin.tar.gz --directory /build/software/maven \ 45 | && rm /build/software/maven/apache-maven-3.2.2-bin.tar.gz 46 | 47 | RUN \ 48 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz \ 49 | && tar -xvzf /build/software/maven/apache-maven-3.3.9-bin.tar.gz --directory /build/software/maven \ 50 | && rm /build/software/maven/apache-maven-3.3.9-bin.tar.gz 51 | 52 | RUN \ 53 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz \ 54 | && tar -xvzf /build/software/maven/apache-maven-3.5.4-bin.tar.gz --directory /build/software/maven \ 55 | && rm /build/software/maven/apache-maven-3.5.4-bin.tar.gz 56 | 57 | RUN \ 58 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-2/2.2.1/binaries/apache-maven-2.2.1-bin.tar.gz \ 59 | && tar -xvzf /build/software/maven/apache-maven-2.2.1-bin.tar.gz --directory /build/software/maven \ 60 | && rm /build/software/maven/apache-maven-2.2.1-bin.tar.gz 61 | 62 | RUN \ 63 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz \ 64 | && tar -xvzf /build/software/maven/apache-maven-3.8.6-bin.tar.gz --directory /build/software/maven \ 65 | && rm /build/software/maven/apache-maven-3.8.6-bin.tar.gz 66 | 67 | RUN mkdir -p /build/software/java 68 | 69 | COPY OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz /build/software/java 70 | 71 | RUN \ 72 | tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz --directory /build/software/java \ 73 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz 74 | 75 | RUN \ 76 | wget -P /build/software/java https://d3pxv6yz143wms.cloudfront.net/11.0.4.11.1/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz \ 77 | && tar -xvzf /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz --directory /build/software/java \ 78 | && rm /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz 79 | 80 | RUN \ 81 | wget -P /build/software/java https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz \ 82 | && tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz --directory /build/software/java \ 83 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz 84 | 85 | COPY jdk-8u171-linux-x64.tar.gz /build/software/java 86 | 87 | RUN \ 88 | tar -xvzf /build/software/java/jdk-8u171-linux-x64.tar.gz --directory /build/software/java \ 89 | && rm /build/software/java/jdk-8u171-linux-x64.tar.gz \ 90 | && mkdir -p /build/software/jce \ 91 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 92 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 93 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy-original.jar \ 94 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy-original.jar \ 95 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 96 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 97 | && rm /build/software/jce/jce_policy-8.zip \ 98 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 99 | 100 | COPY jdk-8u144-linux-x64.tar.gz /build/software/java 101 | 102 | RUN \ 103 | tar -xvzf /build/software/java/jdk-8u144-linux-x64.tar.gz --directory /build/software/java \ 104 | && rm /build/software/java/jdk-8u144-linux-x64.tar.gz \ 105 | && mkdir -p /build/software/jce \ 106 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 107 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 108 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy-original.jar \ 109 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy-original.jar \ 110 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 111 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 112 | && rm /build/software/jce/jce_policy-8.zip \ 113 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 114 | 115 | COPY jdk-8u45-linux-x64.tar.gz /build/software/java 116 | 117 | RUN \ 118 | tar -xvzf /build/software/java/jdk-8u45-linux-x64.tar.gz --directory /build/software/java \ 119 | && rm /build/software/java/jdk-8u45-linux-x64.tar.gz \ 120 | && mkdir -p /build/software/jce \ 121 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 122 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 123 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy-original.jar \ 124 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy-original.jar \ 125 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 126 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 127 | && rm /build/software/jce/jce_policy-8.zip \ 128 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 129 | 130 | COPY jdk-7u51-linux-x64.tar.gz /build/software/java 131 | 132 | RUN \ 133 | tar -xvzf /build/software/java/jdk-7u51-linux-x64.tar.gz --directory /build/software/java \ 134 | && rm /build/software/java/jdk-7u51-linux-x64.tar.gz \ 135 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/7/UnlimitedJCEPolicyJDK7.zip \ 136 | && unzip -o /build/software/jce/UnlimitedJCEPolicyJDK7.zip -d /build/software/jce \ 137 | && mv /build/software/java/jdk1.7.0_51/jre/lib/security/local_policy.jar /build/software/java/jdk1.7.0_51/jre/lib/security/local_policy-original.jar \ 138 | && mv /build/software/java/jdk1.7.0_51/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.7.0_51/jre/lib/security/US_export_policy-original.jar \ 139 | && cp /build/software/jce/UnlimitedJCEPolicy/local_policy.jar /build/software/java/jdk1.7.0_51/jre/lib/security/ \ 140 | && cp /build/software/jce/UnlimitedJCEPolicy/US_export_policy.jar /build/software/java/jdk1.7.0_51/jre/lib/security/ \ 141 | && rm /build/software/jce/UnlimitedJCEPolicyJDK7.zip \ 142 | && rm -r /build/software/jce/UnlimitedJCEPolicy 143 | 144 | RUN apt-get update && apt-get install -y openjdk-7-jdk && apt-get clean && rm -rf /var/lib/apt/lists/* 145 | 146 | RUN \ 147 | add-apt-repository ppa:openjdk-r/ppa -y \ 148 | && apt-get update && apt-get install -y openjdk-8-jdk \ 149 | && apt-get clean \ 150 | && rm -rf /var/lib/apt/lists/* 151 | 152 | COPY jdk-6u33-linux-x64.bin /build/software/java 153 | 154 | RUN \ 155 | chmod a+x /build/software/java/jdk-6u33-linux-x64.bin \ 156 | && cd /build/software/java \ 157 | && echo "\n" | sh /build/software/java/jdk-6u33-linux-x64.bin \ 158 | && rm /build/software/java/jdk-6u33-linux-x64.bin 159 | 160 | RUN \ 161 | wget -P /build/software/nodejs https://nodejs.org/dist/v8.8.1/node-v8.8.1-linux-x64.tar.xz \ 162 | && tar -xvf /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz --directory /build/software/nodejs \ 163 | && rm /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz 164 | 165 | RUN \ 166 | wget -P /build/software/nodejs https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz \ 167 | && tar -xvf /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz --directory /build/software/nodejs \ 168 | && rm /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz 169 | 170 | RUN wget -P /build/software/go https://dl.google.com/go/go1.10.linux-amd64.tar.gz \ 171 | && tar -xzf /build/software/go/go1.10.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.10 && rm /build/software/go/go1.10.linux-amd64.tar.gz 172 | 173 | RUN wget -P /build/software/go https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz \ 174 | && tar -xzf /build/software/go/go1.12.5.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.12.5 && rm /build/software/go/go1.12.5.linux-amd64.tar.gz 175 | 176 | RUN wget -P /build/software/go https://dl.google.com/go/go1.13.linux-amd64.tar.gz \ 177 | && tar -xzf /build/software/go/go1.13.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.13 && rm /build/software/go/go1.13.linux-amd64.tar.gz 178 | 179 | ENV GOPATH /build/software/go/go 180 | ENV PATH $GOPATH/bin:/build/software/go/go-1.12.5/bin:$PATH 181 | ENV PATH $GOPATH/bin:/build/software/go/go-1.13/bin:$PATH 182 | RUN mkdir -p "$GOPATH/src/github.com/wso2" "$GOPATH/bin" && chmod -R 777 "$GOPATH" 183 | RUN curl https://glide.sh/get | sh 184 | 185 | ENV LC_ALL=C.UTF-8 186 | ENV LANG=C.UTF-8 187 | 188 | RUN \ 189 | apt-get update && apt-get -y install python3-pip \ 190 | && pip3 --version \ 191 | && apt-get -y install build-essential python3-dev \ 192 | && pip3 install mkdocs==1.0.4 && mkdocs --version \ 193 | && pip3 install mkdocs-material==4.4.0 \ 194 | && pip3 install pygments==2.4.2 \ 195 | && apt-get -y install jq 196 | 197 | RUN \ 198 | apt-get update && apt-get -y install python-pip \ 199 | && pip --version \ 200 | && apt-get install -y libxml2-dev libxslt-dev \ 201 | && pip install beautifulsoup4 \ 202 | && apt-get install python-lxml 203 | 204 | RUN \ 205 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \ 206 | && tar -xvzf /build/software/maven/apache-maven-3.6.3-bin.tar.gz --directory /build/software/maven \ 207 | && rm /build/software/maven/apache-maven-3.6.3-bin.tar.gz 208 | 209 | COPY jdk-8u221-linux-x64.tar.gz /build/software/java 210 | 211 | RUN \ 212 | tar -xvzf /build/software/java/jdk-8u221-linux-x64.tar.gz --directory /build/software/java \ 213 | && rm /build/software/java/jdk-8u221-linux-x64.tar.gz \ 214 | && mkdir -p /build/software/jce \ 215 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 216 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 217 | && mv /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/local_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/local_policy-original.jar \ 218 | && mv /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/US_export_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/US_export_policy-original.jar \ 219 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/ \ 220 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/ \ 221 | && rm /build/software/jce/jce_policy-8.zip \ 222 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 223 | 224 | RUN rm /usr/bin/java \ 225 | && ln -s /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java /usr/bin/java 226 | 227 | RUN \ 228 | echo "net.ipv4.ip_local_port_range=15000 61000" >> /etc/sysctl.conf \ 229 | && echo "net.ipv4.tcp_fin_timeout=30" >> /etc/sysctl.conf \ 230 | && echo "* soft nofile 65535" >> /etc/security/limits.conf \ 231 | && echo "* hard nofile 65535" >> /etc/security/limits.conf \ 232 | && echo "* soft nproc 65535" >> /etc/security/limits.conf \ 233 | && echo "* hard nproc 65535" >> /etc/security/limits.conf 234 | 235 | RUN \ 236 | mkdir -p /home/jenkins 237 | 238 | RUN mkdir -p /build/gpg-keys/.gnupg 239 | ADD .gnupg /build/gpg-keys/.gnupg 240 | 241 | ARG JENKINS_REMOTING_VERSION=3.5 242 | 243 | # See https://github.com/jenkinsci/docker-slave/blob/2.62/Dockerfile#L32 244 | RUN curl --create-dirs -sSLo /usr/share/jenkins/slave.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/$JENKINS_REMOTING_VERSION/remoting-$JENKINS_REMOTING_VERSION.jar \ 245 | && chmod 755 /usr/share/jenkins \ 246 | && chmod 644 /usr/share/jenkins/slave.jar \ 247 | && chmod a+rwx /home/jenkins 248 | 249 | EXPOSE 22 250 | 251 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 252 | 253 | ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] 254 | 255 | CMD ["/usr/sbin/sshd", "-D"] 256 | -------------------------------------------------------------------------------- /support.bionic.Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2023 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | 17 | # ------------------------------------------------------------------------ 18 | 19 | FROM ubuntu:bionic 20 | 21 | RUN \ 22 | apt-get -q update \ 23 | && apt-get install -y \ 24 | ant \ 25 | curl \ 26 | dbus-x11 \ 27 | git \ 28 | openssh-server \ 29 | software-properties-common \ 30 | ttf-ancient-fonts \ 31 | unzip \ 32 | wget \ 33 | xvfb \ 34 | zip \ 35 | sudo \ 36 | && apt-get clean \ 37 | && rm -rf /var/lib/apt/lists/* \ 38 | && mkdir /var/run/sshd 39 | 40 | #add maven versions here 41 | 42 | RUN \ 43 | mkdir -p /build/software/maven \ 44 | && wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz \ 45 | && tar -xvzf /build/software/maven/apache-maven-3.0.5-bin.tar.gz --directory /build/software/maven \ 46 | && rm /build/software/maven/apache-maven-3.0.5-bin.tar.gz 47 | 48 | RUN \ 49 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz \ 50 | && tar -xvzf /build/software/maven/apache-maven-3.2.2-bin.tar.gz --directory /build/software/maven \ 51 | && rm /build/software/maven/apache-maven-3.2.2-bin.tar.gz 52 | 53 | RUN \ 54 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz \ 55 | && tar -xvzf /build/software/maven/apache-maven-3.3.9-bin.tar.gz --directory /build/software/maven \ 56 | && rm /build/software/maven/apache-maven-3.3.9-bin.tar.gz 57 | 58 | RUN \ 59 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz \ 60 | && tar -xvzf /build/software/maven/apache-maven-3.5.4-bin.tar.gz --directory /build/software/maven \ 61 | && rm /build/software/maven/apache-maven-3.5.4-bin.tar.gz 62 | 63 | RUN \ 64 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \ 65 | && tar -xvzf /build/software/maven/apache-maven-3.6.3-bin.tar.gz --directory /build/software/maven \ 66 | && rm /build/software/maven/apache-maven-3.6.3-bin.tar.gz 67 | 68 | RUN \ 69 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz \ 70 | && tar -xvzf /build/software/maven/apache-maven-3.8.6-bin.tar.gz --directory /build/software/maven \ 71 | && rm /build/software/maven/apache-maven-3.8.6-bin.tar.gz 72 | 73 | RUN \ 74 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-2/2.2.1/binaries/apache-maven-2.2.1-bin.tar.gz \ 75 | && tar -xvzf /build/software/maven/apache-maven-2.2.1-bin.tar.gz --directory /build/software/maven \ 76 | && rm /build/software/maven/apache-maven-2.2.1-bin.tar.gz 77 | 78 | 79 | RUN mkdir -p /build/software/java 80 | 81 | #add java versions here 82 | 83 | COPY OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz /build/software/java 84 | 85 | RUN \ 86 | tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz --directory /build/software/java \ 87 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz 88 | 89 | COPY amazon-corretto-11.0.4.11.1-linux-x64.tar.gz /build/software/java 90 | 91 | RUN \ 92 | tar -xvzf /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz --directory /build/software/java \ 93 | && rm /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz 94 | 95 | RUN \ 96 | wget -P /build/software/java https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz \ 97 | && tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz --directory /build/software/java \ 98 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz 99 | 100 | RUN \ 101 | wget -P /build/software/java https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz \ 102 | && tar -xvzf /build/software/java/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz --directory /build/software/java \ 103 | && rm /build/software/java/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz 104 | 105 | COPY jdk-8u171-linux-x64.tar.gz /build/software/java 106 | 107 | RUN \ 108 | tar -xvzf /build/software/java/jdk-8u171-linux-x64.tar.gz --directory /build/software/java \ 109 | && rm /build/software/java/jdk-8u171-linux-x64.tar.gz \ 110 | && mkdir -p /build/software/jce \ 111 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 112 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 113 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy-original.jar \ 114 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy-original.jar \ 115 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 116 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 117 | && rm /build/software/jce/jce_policy-8.zip \ 118 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 119 | 120 | COPY jdk-8u144-linux-x64.tar.gz /build/software/java 121 | 122 | RUN \ 123 | tar -xvzf /build/software/java/jdk-8u144-linux-x64.tar.gz --directory /build/software/java \ 124 | && rm /build/software/java/jdk-8u144-linux-x64.tar.gz \ 125 | && mkdir -p /build/software/jce \ 126 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 127 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 128 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy-original.jar \ 129 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy-original.jar \ 130 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 131 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 132 | && rm /build/software/jce/jce_policy-8.zip \ 133 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 134 | 135 | COPY jdk-8u45-linux-x64.tar.gz /build/software/java 136 | 137 | RUN \ 138 | tar -xvzf /build/software/java/jdk-8u45-linux-x64.tar.gz --directory /build/software/java \ 139 | && rm /build/software/java/jdk-8u45-linux-x64.tar.gz \ 140 | && mkdir -p /build/software/jce \ 141 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 142 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 143 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy-original.jar \ 144 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy-original.jar \ 145 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 146 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 147 | && rm /build/software/jce/jce_policy-8.zip \ 148 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 149 | 150 | RUN \ 151 | add-apt-repository ppa:openjdk-r/ppa -y \ 152 | && apt-get update \ 153 | && apt-get install -y \ 154 | openjdk-8-jdk \ 155 | && apt-get clean \ 156 | && rm -rf /var/lib/apt/lists/* 157 | 158 | #add node versions here 159 | 160 | 161 | RUN \ 162 | wget -P /build/software/nodejs https://nodejs.org/dist/v8.8.1/node-v8.8.1-linux-x64.tar.xz \ 163 | && tar -xvf /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz --directory /build/software/nodejs \ 164 | && rm /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz 165 | 166 | RUN \ 167 | wget -P /build/software/nodejs https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz \ 168 | && tar -xvf /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz --directory /build/software/nodejs \ 169 | && rm /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz 170 | 171 | RUN \ 172 | wget -P /build/software/nodejs https://nodejs.org/dist/v12.20.1/node-v12.20.1-linux-x64.tar.xz \ 173 | && tar -xvf /build/software/nodejs/node-v12.20.1-linux-x64.tar.xz --directory /build/software/nodejs \ 174 | && rm /build/software/nodejs/node-v12.20.1-linux-x64.tar.xz 175 | 176 | RUN \ 177 | wget -P /build/software/nodejs https://nodejs.org/dist/v14.21.3/node-v14.21.3-linux-x64.tar.xz \ 178 | && tar -xvf /build/software/nodejs/node-v14.21.3-linux-x64.tar.xz --directory /build/software/nodejs \ 179 | && rm /build/software/nodejs/node-v14.21.3-linux-x64.tar.xz 180 | 181 | RUN \ 182 | wget -P /build/software/nodejs https://nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz \ 183 | && tar -xvf /build/software/nodejs/node-v16.13.1-linux-x64.tar.xz --directory /build/software/nodejs \ 184 | && rm /build/software/nodejs/node-v16.13.1-linux-x64.tar.xz 185 | 186 | #add go versions here 187 | 188 | RUN wget -P /build/software/go https://dl.google.com/go/go1.10.linux-amd64.tar.gz \ 189 | && tar -xzf /build/software/go/go1.10.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.10 && rm /build/software/go/go1.10.linux-amd64.tar.gz 190 | 191 | RUN wget -P /build/software/go https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz \ 192 | && tar -xzf /build/software/go/go1.12.5.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.12.5 && rm /build/software/go/go1.12.5.linux-amd64.tar.gz 193 | 194 | RUN wget -P /build/software/go https://dl.google.com/go/go1.13.linux-amd64.tar.gz \ 195 | && tar -xzf /build/software/go/go1.13.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.13 && rm /build/software/go/go1.13.linux-amd64.tar.gz 196 | 197 | RUN wget -P /build/software/go https://dl.google.com/go/go1.14.linux-amd64.tar.gz \ 198 | && tar -xzf /build/software/go/go1.14.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.14 && rm /build/software/go/go1.14.linux-amd64.tar.gz 199 | 200 | RUN wget -P /build/software/go https://dl.google.com/go/go1.20.linux-amd64.tar.gz \ 201 | && tar -xzf /build/software/go/go1.20.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.20 && rm /build/software/go/go1.20.linux-amd64.tar.gz 202 | 203 | ENV GOPATH /build/software/go/go 204 | ENV PATH $GOPATH/bin:/build/software/go/go-1.12.5/bin:$PATH 205 | ENV PATH $GOPATH/bin:/build/software/go/go-1.13/bin:$PATH 206 | ENV PATH $GOPATH/bin:/build/software/go/go-1.14/bin:$PATH 207 | ENV PATH $GOPATH/bin:/build/software/go/go-1.20/bin:$PATH 208 | 209 | RUN mkdir -p "$GOPATH/src/github.com/wso2" "$GOPATH/bin" && chmod -R 777 "$GOPATH" 210 | RUN curl https://glide.sh/get | sh 211 | 212 | ENV LC_ALL=C.UTF-8 213 | ENV LANG=C.UTF-8 214 | 215 | RUN \ 216 | apt-get update \ 217 | && apt-get -y install \ 218 | python3-pip \ 219 | && pip3 --version \ 220 | && apt-get -y install \ 221 | build-essential \ 222 | python3-dev \ 223 | && pip3 install mkdocs==1.0.4 \ 224 | && mkdocs --version \ 225 | && pip3 install mkdocs-material==4.4.0 \ 226 | && pip3 install pygments==2.4.2 \ 227 | && apt-get -y install jq 228 | 229 | RUN \ 230 | apt-get -y update \ 231 | && apt-get -y install \ 232 | python-pip \ 233 | && pip --version \ 234 | && apt-get install -y \ 235 | libxml2-dev \ 236 | libxslt-dev \ 237 | && pip3 install \ 238 | beautifulsoup4 \ 239 | && apt-get install -y \ 240 | python-lxml 241 | 242 | RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ 243 | && unzip awscliv2.zip \ 244 | && ./aws/install \ 245 | && rm -rf \ 246 | awscliv2.zip 247 | 248 | COPY OpenJDK8U-jdk_x64_linux_hotspot_8u362b09.tar.gz /build/software/java 249 | 250 | RUN \ 251 | tar -xvzf /build/software/java/OpenJDK8U-jdk_x64_linux_hotspot_8u362b09.tar.gz --directory /build/software/java \ 252 | && rm /build/software/java/OpenJDK8U-jdk_x64_linux_hotspot_8u362b09.tar.gz 253 | 254 | ENV JAVA_HOME /build/software/java/jdk8u362-b09 255 | 256 | RUN \ 257 | wget -P /build/software/android https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip \ 258 | && unzip /build/software/android/sdk-tools-linux-4333796.zip -d /build/software/android/ \ 259 | && rm /build/software/android/sdk-tools-linux-4333796.zip \ 260 | && yes | /build/software/android/tools/bin/sdkmanager --licenses \ 261 | && chmod 777 -R /build/software/android/ \ 262 | && unset JAVA_HOME 263 | 264 | ENV ANDROID_HOME /build/software/android 265 | 266 | RUN rm /usr/bin/java \ 267 | && ln -s /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java /usr/bin/java 268 | 269 | RUN \ 270 | echo "net.ipv4.ip_local_port_range=15000 61000" >> /etc/sysctl.conf \ 271 | && echo "net.ipv4.tcp_fin_timeout=30" >> /etc/sysctl.conf \ 272 | && echo "* soft nofile 65535" >> /etc/security/limits.conf \ 273 | && echo "* hard nofile 65535" >> /etc/security/limits.conf \ 274 | && echo "* soft nproc 65535" >> /etc/security/limits.conf \ 275 | && echo "* hard nproc 65535" >> /etc/security/limits.conf 276 | 277 | RUN \ 278 | mkdir -p /home/jenkins 279 | 280 | RUN mkdir -p /build/gpg-keys/.gnupg 281 | ADD .gnupg /build/gpg-keys/.gnupg 282 | 283 | RUN export GPG_TTY=$(tty) 284 | 285 | ARG JENKINS_REMOTING_VERSION=3.5 286 | 287 | # See https://github.com/jenkinsci/docker-slave/blob/2.62/Dockerfile#L32 288 | RUN curl --create-dirs -sSLo /usr/share/jenkins/slave.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/$JENKINS_REMOTING_VERSION/remoting-$JENKINS_REMOTING_VERSION.jar \ 289 | && chmod 755 /usr/share/jenkins \ 290 | && chmod 644 /usr/share/jenkins/slave.jar \ 291 | && chmod a+rwx /home/jenkins 292 | 293 | EXPOSE 22 294 | 295 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 296 | 297 | ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] 298 | 299 | CMD ["/usr/sbin/sshd", "-D"] 300 | -------------------------------------------------------------------------------- /focal.Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2020 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | 17 | # ------------------------------------------------------------------------ 18 | 19 | FROM ubuntu:focal 20 | 21 | ENV TZ=Asia 22 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 23 | 24 | RUN \ 25 | apt-get -q update \ 26 | && apt-get install -y \ 27 | ant \ 28 | curl \ 29 | dbus-x11 \ 30 | git \ 31 | openssh-server \ 32 | software-properties-common \ 33 | ttf-ancient-fonts \ 34 | unzip \ 35 | wget \ 36 | xvfb \ 37 | zip \ 38 | sudo \ 39 | && apt-get clean \ 40 | && rm -rf /var/lib/apt/lists/* \ 41 | && mkdir /var/run/sshd 42 | 43 | RUN \ 44 | mkdir -p /build/software/maven \ 45 | && wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz \ 46 | && tar -xvzf /build/software/maven/apache-maven-3.0.5-bin.tar.gz --directory /build/software/maven \ 47 | && rm /build/software/maven/apache-maven-3.0.5-bin.tar.gz 48 | 49 | RUN \ 50 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz \ 51 | && tar -xvzf /build/software/maven/apache-maven-3.2.2-bin.tar.gz --directory /build/software/maven \ 52 | && rm /build/software/maven/apache-maven-3.2.2-bin.tar.gz 53 | 54 | RUN \ 55 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz \ 56 | && tar -xvzf /build/software/maven/apache-maven-3.3.9-bin.tar.gz --directory /build/software/maven \ 57 | && rm /build/software/maven/apache-maven-3.3.9-bin.tar.gz 58 | 59 | RUN \ 60 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz \ 61 | && tar -xvzf /build/software/maven/apache-maven-3.5.4-bin.tar.gz --directory /build/software/maven \ 62 | && rm /build/software/maven/apache-maven-3.5.4-bin.tar.gz 63 | 64 | RUN \ 65 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \ 66 | && tar -xvzf /build/software/maven/apache-maven-3.6.3-bin.tar.gz --directory /build/software/maven \ 67 | && rm /build/software/maven/apache-maven-3.6.3-bin.tar.gz 68 | 69 | RUN \ 70 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz \ 71 | && tar -xvzf /build/software/maven/apache-maven-3.8.6-bin.tar.gz --directory /build/software/maven \ 72 | && rm /build/software/maven/apache-maven-3.8.6-bin.tar.gz 73 | 74 | RUN \ 75 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-2/2.2.1/binaries/apache-maven-2.2.1-bin.tar.gz \ 76 | && tar -xvzf /build/software/maven/apache-maven-2.2.1-bin.tar.gz --directory /build/software/maven \ 77 | && rm /build/software/maven/apache-maven-2.2.1-bin.tar.gz 78 | 79 | RUN mkdir -p /build/software/java 80 | 81 | COPY OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz /build/software/java 82 | 83 | RUN \ 84 | tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz --directory /build/software/java \ 85 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz 86 | 87 | COPY amazon-corretto-11.0.4.11.1-linux-x64.tar.gz /build/software/java 88 | 89 | RUN \ 90 | tar -xvzf /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz --directory /build/software/java \ 91 | && rm /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz 92 | 93 | RUN \ 94 | wget -P /build/software/java https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz \ 95 | && tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz --directory /build/software/java \ 96 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz 97 | 98 | RUN \ 99 | wget -P /build/software/java https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz \ 100 | && tar -xvzf /build/software/java/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz --directory /build/software/java \ 101 | && rm /build/software/java/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz 102 | 103 | RUN \ 104 | wget -P /build/software/java https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz \ 105 | && tar -xvzf /build/software/java/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz --directory /build/software/java \ 106 | && rm /build/software/java/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz 107 | 108 | COPY jdk-8u171-linux-x64.tar.gz /build/software/java 109 | 110 | RUN \ 111 | tar -xvzf /build/software/java/jdk-8u171-linux-x64.tar.gz --directory /build/software/java \ 112 | && rm /build/software/java/jdk-8u171-linux-x64.tar.gz \ 113 | && mkdir -p /build/software/jce \ 114 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 115 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 116 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy-original.jar \ 117 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy-original.jar \ 118 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 119 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 120 | && rm /build/software/jce/jce_policy-8.zip \ 121 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 122 | 123 | COPY jdk-8u144-linux-x64.tar.gz /build/software/java 124 | 125 | RUN \ 126 | tar -xvzf /build/software/java/jdk-8u144-linux-x64.tar.gz --directory /build/software/java \ 127 | && rm /build/software/java/jdk-8u144-linux-x64.tar.gz \ 128 | && mkdir -p /build/software/jce \ 129 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 130 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 131 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy-original.jar \ 132 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy-original.jar \ 133 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 134 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 135 | && rm /build/software/jce/jce_policy-8.zip \ 136 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 137 | 138 | COPY jdk-8u45-linux-x64.tar.gz /build/software/java 139 | 140 | RUN \ 141 | tar -xvzf /build/software/java/jdk-8u45-linux-x64.tar.gz --directory /build/software/java \ 142 | && rm /build/software/java/jdk-8u45-linux-x64.tar.gz \ 143 | && mkdir -p /build/software/jce \ 144 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 145 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 146 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy-original.jar \ 147 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy-original.jar \ 148 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 149 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 150 | && rm /build/software/jce/jce_policy-8.zip \ 151 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 152 | 153 | 154 | RUN \ 155 | add-apt-repository ppa:openjdk-r/ppa -y \ 156 | && apt-get update \ 157 | && apt-get install -y \ 158 | openjdk-8-jdk \ 159 | && apt-get clean \ 160 | && rm -rf /var/lib/apt/lists/* 161 | 162 | RUN \ 163 | wget -P /build/software/nodejs https://nodejs.org/dist/v8.8.1/node-v8.8.1-linux-x64.tar.xz \ 164 | && tar -xvf /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz --directory /build/software/nodejs \ 165 | && rm /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz 166 | 167 | RUN \ 168 | wget -P /build/software/nodejs https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz \ 169 | && tar -xvf /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz --directory /build/software/nodejs \ 170 | && rm /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz 171 | 172 | RUN \ 173 | wget -P /build/software/nodejs https://nodejs.org/dist/v12.20.1/node-v12.20.1-linux-x64.tar.xz \ 174 | && tar -xvf /build/software/nodejs/node-v12.20.1-linux-x64.tar.xz --directory /build/software/nodejs \ 175 | && rm /build/software/nodejs/node-v12.20.1-linux-x64.tar.xz 176 | 177 | RUN \ 178 | wget -P /build/software/nodejs https://nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz \ 179 | && tar -xvf /build/software/nodejs/node-v16.13.1-linux-x64.tar.xz --directory /build/software/nodejs \ 180 | && rm /build/software/nodejs/node-v16.13.1-linux-x64.tar.xz 181 | 182 | RUN wget -P /build/software/go https://dl.google.com/go/go1.10.linux-amd64.tar.gz \ 183 | && tar -xzf /build/software/go/go1.10.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.10 && rm /build/software/go/go1.10.linux-amd64.tar.gz 184 | 185 | RUN wget -P /build/software/go https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz \ 186 | && tar -xzf /build/software/go/go1.12.5.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.12.5 && rm /build/software/go/go1.12.5.linux-amd64.tar.gz 187 | 188 | RUN wget -P /build/software/go https://dl.google.com/go/go1.13.linux-amd64.tar.gz \ 189 | && tar -xzf /build/software/go/go1.13.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.13 && rm /build/software/go/go1.13.linux-amd64.tar.gz 190 | 191 | RUN wget -P /build/software/go https://dl.google.com/go/go1.14.linux-amd64.tar.gz \ 192 | && tar -xzf /build/software/go/go1.14.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.14 && rm /build/software/go/go1.14.linux-amd64.tar.gz 193 | 194 | RUN wget -P /build/software/go https://dl.google.com/go/go1.20.linux-amd64.tar.gz \ 195 | && tar -xzf /build/software/go/go1.20.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.20 && rm /build/software/go/go1.20.linux-amd64.tar.gz 196 | 197 | ENV GOPATH /build/software/go/go 198 | ENV PATH $GOPATH/bin:/build/software/go/go-1.12.5/bin:$PATH 199 | ENV PATH $GOPATH/bin:/build/software/go/go-1.13/bin:$PATH 200 | ENV PATH $GOPATH/bin:/build/software/go/go-1.14/bin:$PATH 201 | ENV PATH $GOPATH/bin:/build/software/go/go-1.20/bin:$PATH 202 | 203 | RUN mkdir -p "$GOPATH/src/github.com/wso2" "$GOPATH/bin" && chmod -R 777 "$GOPATH" 204 | RUN curl https://glide.sh/get | sh 205 | 206 | ENV LC_ALL=C.UTF-8 207 | ENV LANG=C.UTF-8 208 | 209 | #RUN \ 210 | # apt-get update \ 211 | # && apt-get -y install \ 212 | # python3-pip \ 213 | # && pip3 --version \ 214 | # && apt-get -y install \ 215 | # build-essential \ 216 | # python3-dev \ 217 | # && pip install jinja2==3.0.3 \ 218 | # && pip3 install mkdocs==1.0.4 \ 219 | # && mkdocs --version \ 220 | # && pip3 install mkdocs-material==4.4.0 \ 221 | # && pip3 install pygments==2.4.2 \ 222 | # && apt-get -y install jq 223 | 224 | #RUN \ 225 | # apt-get -y update \ 226 | # && apt-get -y install \ 227 | # python-pip \ 228 | # && pip --version \ 229 | # && apt-get install -y \ 230 | # libxml2-dev \ 231 | # libxslt-dev \ 232 | # && pip3 install \ 233 | # beautifulsoup4 \ 234 | # && apt-get install -y \ 235 | # python-lxml 236 | 237 | COPY OpenJDK8U-jdk_x64_linux_hotspot_8u362b09.tar.gz /build/software/java 238 | 239 | RUN \ 240 | tar -xvzf /build/software/java/OpenJDK8U-jdk_x64_linux_hotspot_8u362b09.tar.gz --directory /build/software/java \ 241 | && rm /build/software/java/OpenJDK8U-jdk_x64_linux_hotspot_8u362b09.tar.gz 242 | 243 | ENV JAVA_HOME /build/software/java/jdk8u362-b09 244 | 245 | 246 | RUN \ 247 | wget -P /build/software/android https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip \ 248 | && unzip /build/software/android/sdk-tools-linux-4333796.zip -d /build/software/android/ \ 249 | && rm /build/software/android/sdk-tools-linux-4333796.zip \ 250 | && yes | /build/software/android/tools/bin/sdkmanager --licenses \ 251 | && chmod 777 -R /build/software/android/ \ 252 | && unset JAVA_HOME 253 | 254 | ENV ANDROID_HOME /build/software/android 255 | 256 | RUN rm /usr/bin/java \ 257 | && ln -s /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java /usr/bin/java 258 | 259 | COPY OpenJDK11U-jdk_x64_linux_hotspot_11.0.22_7.tar.gz /build/software/java 260 | 261 | RUN \ 262 | tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.22_7.tar.gz --directory /build/software/java \ 263 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.22_7.tar.gz 264 | 265 | ENV JAVA_HOME /build/software/java/jdk-11.0.22+7 266 | 267 | 268 | RUN \ 269 | echo "net.ipv4.ip_local_port_range=15000 61000" >> /etc/sysctl.conf \ 270 | && echo "net.ipv4.tcp_fin_timeout=30" >> /etc/sysctl.conf \ 271 | && echo "* soft nofile 65535" >> /etc/security/limits.conf \ 272 | && echo "* hard nofile 65535" >> /etc/security/limits.conf \ 273 | && echo "* soft nproc 65535" >> /etc/security/limits.conf \ 274 | && echo "* hard nproc 65535" >> /etc/security/limits.conf 275 | 276 | RUN \ 277 | mkdir -p /home/jenkins 278 | 279 | RUN mkdir -p /build/gpg-keys/.gnupg 280 | ADD .gnupg /build/gpg-keys/.gnupg 281 | 282 | RUN export GPG_TTY=$(tty) 283 | 284 | ARG JENKINS_REMOTING_VERSION=4.13.3 285 | 286 | # See https://github.com/jenkinsci/docker-slave/blob/2.62/Dockerfile#L32 287 | RUN curl --create-dirs -sSLo /usr/share/jenkins/agent.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/$JENKINS_REMOTING_VERSION/remoting-$JENKINS_REMOTING_VERSION.jar \ 288 | && chmod 755 /usr/share/jenkins \ 289 | && chmod 644 /usr/share/jenkins/agent.jar \ 290 | && chmod a+rwx /home/jenkins 291 | 292 | EXPOSE 22 293 | 294 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 295 | 296 | ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] 297 | 298 | CMD ["/usr/sbin/sshd", "-D"] 299 | -------------------------------------------------------------------------------- /bionic.Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2020 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | 17 | # ------------------------------------------------------------------------ 18 | 19 | FROM ubuntu:bionic 20 | 21 | RUN \ 22 | apt-get -q update \ 23 | && apt-get install -y \ 24 | ant \ 25 | curl \ 26 | dbus-x11 \ 27 | git \ 28 | openssh-server \ 29 | software-properties-common \ 30 | ttf-ancient-fonts \ 31 | unzip \ 32 | wget \ 33 | xvfb \ 34 | zip \ 35 | && apt-get clean \ 36 | && rm -rf /var/lib/apt/lists/* \ 37 | && mkdir /var/run/sshd 38 | 39 | RUN \ 40 | mkdir -p /build/software/maven \ 41 | && wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz \ 42 | && tar -xvzf /build/software/maven/apache-maven-3.0.5-bin.tar.gz --directory /build/software/maven \ 43 | && rm /build/software/maven/apache-maven-3.0.5-bin.tar.gz 44 | 45 | RUN \ 46 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz \ 47 | && tar -xvzf /build/software/maven/apache-maven-3.2.2-bin.tar.gz --directory /build/software/maven \ 48 | && rm /build/software/maven/apache-maven-3.2.2-bin.tar.gz 49 | 50 | RUN \ 51 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz \ 52 | && tar -xvzf /build/software/maven/apache-maven-3.3.9-bin.tar.gz --directory /build/software/maven \ 53 | && rm /build/software/maven/apache-maven-3.3.9-bin.tar.gz 54 | 55 | RUN \ 56 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz \ 57 | && tar -xvzf /build/software/maven/apache-maven-3.5.4-bin.tar.gz --directory /build/software/maven \ 58 | && rm /build/software/maven/apache-maven-3.5.4-bin.tar.gz 59 | 60 | RUN \ 61 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-2/2.2.1/binaries/apache-maven-2.2.1-bin.tar.gz \ 62 | && tar -xvzf /build/software/maven/apache-maven-2.2.1-bin.tar.gz --directory /build/software/maven \ 63 | && rm /build/software/maven/apache-maven-2.2.1-bin.tar.gz 64 | 65 | RUN mkdir -p /build/software/java 66 | 67 | COPY OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz /build/software/java 68 | 69 | RUN \ 70 | tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz --directory /build/software/java \ 71 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz 72 | 73 | RUN \ 74 | wget -P /build/software/java https://d3pxv6yz143wms.cloudfront.net/11.0.4.11.1/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz \ 75 | && tar -xvzf /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz --directory /build/software/java \ 76 | && rm /build/software/java/amazon-corretto-11.0.4.11.1-linux-x64.tar.gz 77 | 78 | RUN \ 79 | wget -P /build/software/java https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz \ 80 | && tar -xvzf /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz --directory /build/software/java \ 81 | && rm /build/software/java/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz 82 | 83 | RUN \ 84 | wget -P /build/software/java https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz \ 85 | && tar -xvzf /build/software/java/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz --directory /build/software/java \ 86 | && rm /build/software/java/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz 87 | 88 | COPY jdk-8u171-linux-x64.tar.gz /build/software/java 89 | 90 | RUN \ 91 | tar -xvzf /build/software/java/jdk-8u171-linux-x64.tar.gz --directory /build/software/java \ 92 | && rm /build/software/java/jdk-8u171-linux-x64.tar.gz \ 93 | && mkdir -p /build/software/jce \ 94 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 95 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 96 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/local_policy-original.jar \ 97 | && mv /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/US_export_policy-original.jar \ 98 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 99 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_171/jre/lib/security/policy/unlimited/ \ 100 | && rm /build/software/jce/jce_policy-8.zip \ 101 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 102 | 103 | COPY jdk-8u144-linux-x64.tar.gz /build/software/java 104 | 105 | RUN \ 106 | tar -xvzf /build/software/java/jdk-8u144-linux-x64.tar.gz --directory /build/software/java \ 107 | && rm /build/software/java/jdk-8u144-linux-x64.tar.gz \ 108 | && mkdir -p /build/software/jce \ 109 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 110 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 111 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/local_policy-original.jar \ 112 | && mv /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/US_export_policy-original.jar \ 113 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 114 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_144/jre/lib/security/ \ 115 | && rm /build/software/jce/jce_policy-8.zip \ 116 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 117 | 118 | COPY jdk-8u45-linux-x64.tar.gz /build/software/java 119 | 120 | RUN \ 121 | tar -xvzf /build/software/java/jdk-8u45-linux-x64.tar.gz --directory /build/software/java \ 122 | && rm /build/software/java/jdk-8u45-linux-x64.tar.gz \ 123 | && mkdir -p /build/software/jce \ 124 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 125 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 126 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/local_policy-original.jar \ 127 | && mv /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/US_export_policy-original.jar \ 128 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 129 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_45/jre/lib/security/ \ 130 | && rm /build/software/jce/jce_policy-8.zip \ 131 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 132 | 133 | COPY jdk-8u321-linux-x64.tar.gz /build/software/java 134 | 135 | RUN \ 136 | tar -xvzf /build/software/java/jdk-8u321-linux-x64.tar.gz --directory /build/software/java \ 137 | && rm /build/software/java/jdk-8u321-linux-x64.tar.gz \ 138 | && mkdir -p /build/software/jce \ 139 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 140 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 141 | && mv /build/software/java/jdk1.8.0_321/jre/lib/security/policy/unlimited/local_policy.jar /build/software/java/jdk1.8.0_321/jre/lib/security/policy/unlimited/local_policy-original.jar \ 142 | && mv /build/software/java/jdk1.8.0_321/jre/lib/security/policy/unlimited/US_export_policy.jar /build/software/java/jdk1.8.0_321/jre/lib/security/policy/unlimited/US_export_policy-original.jar \ 143 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_321/jre/lib/security/policy/unlimited/ \ 144 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_321/jre/lib/security/policy/unlimited/ \ 145 | && rm /build/software/jce/jce_policy-8.zip \ 146 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 147 | 148 | RUN \ 149 | add-apt-repository ppa:openjdk-r/ppa -y \ 150 | && apt-get update \ 151 | && apt-get install -y \ 152 | openjdk-8-jdk \ 153 | && apt-get clean \ 154 | && rm -rf /var/lib/apt/lists/* 155 | 156 | RUN \ 157 | wget -P /build/software/nodejs https://nodejs.org/dist/v8.8.1/node-v8.8.1-linux-x64.tar.xz \ 158 | && tar -xvf /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz --directory /build/software/nodejs \ 159 | && rm /build/software/nodejs/node-v8.8.1-linux-x64.tar.xz 160 | 161 | RUN \ 162 | wget -P /build/software/nodejs https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz \ 163 | && tar -xvf /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz --directory /build/software/nodejs \ 164 | && rm /build/software/nodejs/node-v10.16.2-linux-x64.tar.xz 165 | 166 | RUN \ 167 | wget -P /build/software/nodejs https://nodejs.org/dist/v12.20.1/node-v12.20.1-linux-x64.tar.xz \ 168 | && tar -xvf /build/software/nodejs/node-v12.20.1-linux-x64.tar.xz --directory /build/software/nodejs \ 169 | && rm /build/software/nodejs/node-v12.20.1-linux-x64.tar.xz 170 | 171 | RUN \ 172 | wget -P /build/software/nodejs https://nodejs.org/dist/v14.21.3/node-v14.21.3-linux-x64.tar.xz \ 173 | && tar -xvf /build/software/nodejs/node-v14.21.3-linux-x64.tar.xz --directory /build/software/nodejs \ 174 | && rm /build/software/nodejs/node-v14.21.3-linux-x64.tar.xz 175 | 176 | RUN \ 177 | wget -P /build/software/nodejs https://nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz \ 178 | && tar -xvf /build/software/nodejs/node-v16.13.1-linux-x64.tar.xz --directory /build/software/nodejs \ 179 | && rm /build/software/nodejs/node-v16.13.1-linux-x64.tar.xz 180 | 181 | RUN wget -P /build/software/go https://dl.google.com/go/go1.10.linux-amd64.tar.gz \ 182 | && tar -xzf /build/software/go/go1.10.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.10 && rm /build/software/go/go1.10.linux-amd64.tar.gz 183 | 184 | RUN wget -P /build/software/go https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz \ 185 | && tar -xzf /build/software/go/go1.12.5.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.12.5 && rm /build/software/go/go1.12.5.linux-amd64.tar.gz 186 | 187 | RUN wget -P /build/software/go https://dl.google.com/go/go1.13.linux-amd64.tar.gz \ 188 | && tar -xzf /build/software/go/go1.13.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.13 && rm /build/software/go/go1.13.linux-amd64.tar.gz 189 | 190 | RUN wget -P /build/software/go https://dl.google.com/go/go1.14.linux-amd64.tar.gz \ 191 | && tar -xzf /build/software/go/go1.14.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.14 && rm /build/software/go/go1.14.linux-amd64.tar.gz 192 | 193 | RUN wget -P /build/software/go https://dl.google.com/go/go1.20.linux-amd64.tar.gz \ 194 | && tar -xzf /build/software/go/go1.20.linux-amd64.tar.gz --directory /build/software/go && mv /build/software/go/go /build/software/go/go-1.20 && rm /build/software/go/go1.20.linux-amd64.tar.gz 195 | 196 | ENV GOPATH /build/software/go/go 197 | ENV PATH $GOPATH/bin:/build/software/go/go-1.12.5/bin:$PATH 198 | ENV PATH $GOPATH/bin:/build/software/go/go-1.13/bin:$PATH 199 | ENV PATH $GOPATH/bin:/build/software/go/go-1.14/bin:$PATH 200 | ENV PATH $GOPATH/bin:/build/software/go/go-1.20/bin:$PATH 201 | 202 | RUN mkdir -p "$GOPATH/src/github.com/wso2" "$GOPATH/bin" && chmod -R 777 "$GOPATH" 203 | RUN curl https://glide.sh/get | sh 204 | 205 | ENV LC_ALL=C.UTF-8 206 | ENV LANG=C.UTF-8 207 | 208 | RUN \ 209 | apt-get update \ 210 | && apt-get -y install \ 211 | python3-pip \ 212 | && pip3 --version \ 213 | && apt-get -y install \ 214 | build-essential \ 215 | python3-dev \ 216 | && pip3 install mkdocs==1.0.4 \ 217 | && mkdocs --version \ 218 | && pip3 install mkdocs-material==4.4.0 \ 219 | && pip3 install pygments==2.4.2 \ 220 | && apt-get -y install jq 221 | 222 | RUN \ 223 | apt-get update \ 224 | && apt-get -y install \ 225 | python-pip \ 226 | && pip --version \ 227 | && apt-get install -y \ 228 | libxml2-dev \ 229 | libxslt-dev \ 230 | && pip3 install \ 231 | beautifulsoup4 \ 232 | && apt-get install -y \ 233 | python-lxml 234 | 235 | RUN \ 236 | wget -P /build/software/maven https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \ 237 | && tar -xvzf /build/software/maven/apache-maven-3.6.3-bin.tar.gz --directory /build/software/maven \ 238 | && rm /build/software/maven/apache-maven-3.6.3-bin.tar.gz 239 | 240 | COPY jdk-8u221-linux-x64.tar.gz /build/software/java 241 | 242 | RUN \ 243 | tar -xvzf /build/software/java/jdk-8u221-linux-x64.tar.gz --directory /build/software/java \ 244 | && rm /build/software/java/jdk-8u221-linux-x64.tar.gz \ 245 | && mkdir -p /build/software/jce \ 246 | && wget -P /build/software/jce --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \ 247 | && unzip -o /build/software/jce/jce_policy-8.zip -d /build/software/jce \ 248 | && mv /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/local_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/local_policy-original.jar \ 249 | && mv /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/US_export_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/US_export_policy-original.jar \ 250 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/local_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/ \ 251 | && cp /build/software/jce/UnlimitedJCEPolicyJDK8/US_export_policy.jar /build/software/java/jdk1.8.0_221/jre/lib/security/policy/unlimited/ \ 252 | && rm /build/software/jce/jce_policy-8.zip \ 253 | && rm -r /build/software/jce/UnlimitedJCEPolicyJDK8 254 | 255 | ENV JAVA_HOME /build/software/java/jdk1.8.0_221 256 | 257 | RUN \ 258 | wget -P /build/software/android https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip \ 259 | && unzip /build/software/android/sdk-tools-linux-4333796.zip -d /build/software/android/ \ 260 | && rm /build/software/android/sdk-tools-linux-4333796.zip \ 261 | && yes | /build/software/android/tools/bin/sdkmanager --licenses \ 262 | && chmod 777 -R /build/software/android/ \ 263 | && unset JAVA_HOME 264 | 265 | ENV ANDROID_HOME /build/software/android 266 | 267 | RUN rm /usr/bin/java \ 268 | && ln -s /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java /usr/bin/java 269 | 270 | RUN \ 271 | echo "net.ipv4.ip_local_port_range=15000 61000" >> /etc/sysctl.conf \ 272 | && echo "net.ipv4.tcp_fin_timeout=30" >> /etc/sysctl.conf \ 273 | && echo "* soft nofile 65535" >> /etc/security/limits.conf \ 274 | && echo "* hard nofile 65535" >> /etc/security/limits.conf \ 275 | && echo "* soft nproc 65535" >> /etc/security/limits.conf \ 276 | && echo "* hard nproc 65535" >> /etc/security/limits.conf 277 | 278 | RUN \ 279 | mkdir -p /home/jenkins 280 | 281 | RUN mkdir -p /build/gpg-keys/.gnupg 282 | ADD .gnupg /build/gpg-keys/.gnupg 283 | 284 | ARG JENKINS_REMOTING_VERSION=3.5 285 | 286 | # See https://github.com/jenkinsci/docker-slave/blob/2.62/Dockerfile#L32 287 | RUN curl --create-dirs -sSLo /usr/share/jenkins/slave.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/$JENKINS_REMOTING_VERSION/remoting-$JENKINS_REMOTING_VERSION.jar \ 288 | && chmod 755 /usr/share/jenkins \ 289 | && chmod 644 /usr/share/jenkins/slave.jar \ 290 | && chmod a+rwx /home/jenkins 291 | 292 | EXPOSE 22 293 | 294 | COPY entrypoint.sh /usr/local/bin/entrypoint.sh 295 | 296 | ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] 297 | 298 | CMD ["/usr/sbin/sshd", "-D"] 299 | --------------------------------------------------------------------------------