vasraz | 987fc74 | 2021-11-29 17:42:02 +0000 | [diff] [blame] | 1 | FROM onap/policy-jdk-debian:2.0.2 |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 2 | |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 3 | RUN addgroup sdc |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 4 | RUN adduser --gecos "sdc sdc,1,1,1" --disabled-password --ingroup sdc --shell /bin/sh sdc |
| 5 | USER sdc |
| 6 | RUN mkdir ~/.cassandra/ && \ |
| 7 | echo '[cql]' > ~/.cassandra/cqlshrc && \ |
| 8 | echo 'version=3.4.4' >> ~/.cassandra/cqlshrc |
| 9 | USER root |
| 10 | |
vasraz | 855a434 | 2021-08-16 13:45:06 +0100 | [diff] [blame] | 11 | RUN apt-get update --allow-releaseinfo-change && apt-get install -y python-pip && \ |
vasraz | 987fc74 | 2021-11-29 17:42:02 +0000 | [diff] [blame] | 12 | python -m pip install --upgrade pip \ |
andre.schmid | b3761a8 | 2022-01-19 20:41:02 +0000 | [diff] [blame] | 13 | pip install cqlsh==6.0.0 && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 14 | mkdir ~/.cassandra/ && \ |
| 15 | echo '[cql]' > ~/.cassandra/cqlshrc && \ |
| 16 | echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \ |
| 17 | set -ex && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 18 | apt-get install -y \ |
| 19 | make \ |
| 20 | gcc \ |
| 21 | ruby \ |
| 22 | ruby-dev \ |
| 23 | libffi-dev \ |
| 24 | libxml2-dev && \ |
| 25 | gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 etc webrick --no-document && \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 26 | apt-get update -y && apt-get remove bash -y --allow-remove-essential && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 27 | apt-get install -y binutils && apt-get clean && gem cleanup |
| 28 | |
| 29 | USER sdc |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 30 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 31 | COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/ |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 32 | COPY --chown=sdc:sdc init_schemas.cql /home/sdc/ |
andre.schmid | b8bfef3 | 2021-08-12 23:05:15 +0100 | [diff] [blame] | 33 | COPY --chown=sdc:sdc upgrade-scripts /home/sdc/upgrade-scripts |
| 34 | COPY --chown=sdc:sdc startup.sh /home/sdc/ |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 35 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 36 | RUN chmod 770 /home/sdc/startup.sh |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 37 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 38 | ENTRYPOINT [ "/home/sdc/startup.sh" ] |