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 | |
eschcam | 94176d7 | 2023-03-30 13:47:20 +0100 | [diff] [blame^] | 11 | RUN apt-get update --allow-releaseinfo-change && \ |
| 12 | apt-get purge python* -y && \ |
| 13 | apt-get install -y python3-pip && \ |
| 14 | python3 -m pip install --upgrade pip && \ |
| 15 | pip3 install cqlsh==6.1.0 && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 16 | mkdir ~/.cassandra/ && \ |
| 17 | echo '[cql]' > ~/.cassandra/cqlshrc && \ |
| 18 | echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \ |
| 19 | set -ex && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 20 | apt-get install -y \ |
| 21 | make \ |
| 22 | gcc \ |
| 23 | ruby \ |
| 24 | ruby-dev \ |
| 25 | libffi-dev \ |
| 26 | libxml2-dev && \ |
vasraz | 9efabf2 | 2022-08-20 10:13:09 +0100 | [diff] [blame] | 27 | gem install public_suffix -v 4.0.7 --no-document && \ |
vasraz | 101e0a8 | 2022-06-09 19:36:13 +0100 | [diff] [blame] | 28 | gem install multipart-post -v 2.2.0 --no-document && \ |
vasraz | 64e74fe | 2022-12-05 16:40:30 +0000 | [diff] [blame] | 29 | gem install etc -v 1.3.0 --no-document && \ |
vasraz | 52d23fc | 2022-12-28 12:24:21 +0000 | [diff] [blame] | 30 | gem install bundler -v 2.3.26 --no-document && \ |
vasraz | 64e74fe | 2022-12-05 16:40:30 +0000 | [diff] [blame] | 31 | 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] | 32 | apt-get update -y && apt-get remove bash -y --allow-remove-essential && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 33 | apt-get install -y binutils && apt-get clean && gem cleanup |
| 34 | |
| 35 | USER sdc |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 36 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 37 | COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/ |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 38 | COPY --chown=sdc:sdc init_schemas.cql /home/sdc/ |
andre.schmid | b8bfef3 | 2021-08-12 23:05:15 +0100 | [diff] [blame] | 39 | COPY --chown=sdc:sdc upgrade-scripts /home/sdc/upgrade-scripts |
| 40 | COPY --chown=sdc:sdc startup.sh /home/sdc/ |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 41 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 42 | RUN chmod 770 /home/sdc/startup.sh |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 43 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 44 | ENTRYPOINT [ "/home/sdc/startup.sh" ] |