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 && \ |
vasraz | 9efabf2 | 2022-08-20 10:13:09 +0100 | [diff] [blame] | 25 | gem install public_suffix -v 4.0.7 --no-document && \ |
vasraz | 101e0a8 | 2022-06-09 19:36:13 +0100 | [diff] [blame] | 26 | gem install multipart-post -v 2.2.0 --no-document && \ |
vasraz | 64e74fe | 2022-12-05 16:40:30 +0000 | [diff] [blame^] | 27 | gem install etc -v 1.3.0 --no-document && \ |
| 28 | gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 webrick --no-document && \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 29 | apt-get update -y && apt-get remove bash -y --allow-remove-essential && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 30 | apt-get install -y binutils && apt-get clean && gem cleanup |
| 31 | |
| 32 | USER sdc |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 33 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 34 | COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/ |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 35 | COPY --chown=sdc:sdc init_schemas.cql /home/sdc/ |
andre.schmid | b8bfef3 | 2021-08-12 23:05:15 +0100 | [diff] [blame] | 36 | COPY --chown=sdc:sdc upgrade-scripts /home/sdc/upgrade-scripts |
| 37 | COPY --chown=sdc:sdc startup.sh /home/sdc/ |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 38 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 39 | RUN chmod 770 /home/sdc/startup.sh |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 40 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 41 | ENTRYPOINT [ "/home/sdc/startup.sh" ] |