blob: d2307b1380ff1cbe1a56df5f336a65e808455c81 [file] [log] [blame]
vasraz987fc742021-11-29 17:42:02 +00001FROM onap/policy-jdk-debian:2.0.2
sebdet30670ac2020-08-04 14:16:00 +02002
sebdet30670ac2020-08-04 14:16:00 +02003RUN addgroup sdc
sebdet30670ac2020-08-04 14:16:00 +02004RUN adduser --gecos "sdc sdc,1,1,1" --disabled-password --ingroup sdc --shell /bin/sh sdc
5USER sdc
6RUN mkdir ~/.cassandra/ && \
7 echo '[cql]' > ~/.cassandra/cqlshrc && \
8 echo 'version=3.4.4' >> ~/.cassandra/cqlshrc
9USER root
10
eschcam94176d72023-03-30 13:47:20 +010011RUN 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 && \
sebdet30670ac2020-08-04 14:16:00 +020016 mkdir ~/.cassandra/ && \
17 echo '[cql]' > ~/.cassandra/cqlshrc && \
18 echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \
19 set -ex && \
sebdet30670ac2020-08-04 14:16:00 +020020 apt-get install -y \
21 make \
22 gcc \
23 ruby \
24 ruby-dev \
25 libffi-dev \
26 libxml2-dev && \
vasraz9efabf22022-08-20 10:13:09 +010027 gem install public_suffix -v 4.0.7 --no-document && \
vasraz101e0a82022-06-09 19:36:13 +010028 gem install multipart-post -v 2.2.0 --no-document && \
vasraz64e74fe2022-12-05 16:40:30 +000029 gem install etc -v 1.3.0 --no-document && \
vasraz52d23fc2022-12-28 12:24:21 +000030 gem install bundler -v 2.3.26 --no-document && \
vasraz64e74fe2022-12-05 16:40:30 +000031 gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 webrick --no-document && \
sebdetdf353be2020-09-21 22:13:05 +020032 apt-get update -y && apt-get remove bash -y --allow-remove-essential && \
sebdet30670ac2020-08-04 14:16:00 +020033 apt-get install -y binutils && apt-get clean && gem cleanup
34
35USER sdc
Avi Zivc175a0d2018-03-15 13:21:44 +020036
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000037COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000038COPY --chown=sdc:sdc init_schemas.cql /home/sdc/
andre.schmidb8bfef32021-08-12 23:05:15 +010039COPY --chown=sdc:sdc upgrade-scripts /home/sdc/upgrade-scripts
40COPY --chown=sdc:sdc startup.sh /home/sdc/
Avi Zivc175a0d2018-03-15 13:21:44 +020041
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000042RUN chmod 770 /home/sdc/startup.sh
Avi Zivc175a0d2018-03-15 13:21:44 +020043
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000044ENTRYPOINT [ "/home/sdc/startup.sh" ]