| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| # base things off the testing image without dependencies warmed up |
| FROM nastra/cassandra-testing-ubuntu1910-java11 |
| MAINTAINER Eduard Tudenhoefner <etudenhoefner@gmail.com> |
| |
| USER cassandra |
| ENV HOME /home/cassandra |
| WORKDIR /home/cassandra |
| |
| # Fetch the maven dependencies in advance since this tends to fail at runtime |
| ARG CASSANDRA_GIT_URL=https://gitbox.apache.org/repos/asf/cassandra.git |
| RUN /bin/bash -c "git clone ${CASSANDRA_GIT_URL} ~/cassandra && \ |
| cd ~/cassandra && ant maven-ant-tasks-retrieve-build && \ |
| git checkout origin/cassandra-3.11 && ant maven-ant-tasks-retrieve-build && \ |
| git checkout origin/cassandra-3.0 && ant maven-ant-tasks-retrieve-build && \ |
| git checkout origin/cassandra-2.2 && ant maven-ant-tasks-retrieve-build && \ |
| git checkout origin/cassandra-2.1 && ant maven-ant-tasks-retrieve-build && \ |
| rm -fr ~/cassandra" |
| |
| # Initialize the CCM git repo as well as this also can fail to clone |
| RUN /bin/bash -c "source ~/env3.6/bin/activate && \ |
| ccm create -n 1 -v git:trunk test && ccm remove test && \ |
| ccm create -n 1 -v git:cassandra-3.11 test && ccm remove test && \ |
| ccm create -n 1 -v git:cassandra-3.0 test && ccm remove test && \ |
| ccm create -n 1 -v git:cassandra-2.2 test && ccm remove test && \ |
| ccm create -n 1 -v git:cassandra-2.1 test && ccm remove test" |