blob: abd09a9767febb3f19437bd8e638c061b8073665 [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
vasraz855a4342021-08-16 13:45:06 +010011RUN apt-get update --allow-releaseinfo-change && apt-get install -y python-pip && \
vasraz987fc742021-11-29 17:42:02 +000012 python -m pip install --upgrade pip \
andre.schmidb3761a82022-01-19 20:41:02 +000013 pip install cqlsh==6.0.0 && \
sebdet30670ac2020-08-04 14:16:00 +020014 mkdir ~/.cassandra/ && \
15 echo '[cql]' > ~/.cassandra/cqlshrc && \
16 echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \
17 set -ex && \
sebdet30670ac2020-08-04 14:16:00 +020018 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 && \
sebdetdf353be2020-09-21 22:13:05 +020026 apt-get update -y && apt-get remove bash -y --allow-remove-essential && \
sebdet30670ac2020-08-04 14:16:00 +020027 apt-get install -y binutils && apt-get clean && gem cleanup
28
29USER sdc
Avi Zivc175a0d2018-03-15 13:21:44 +020030
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000031COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000032COPY --chown=sdc:sdc init_schemas.cql /home/sdc/
andre.schmidb8bfef32021-08-12 23:05:15 +010033COPY --chown=sdc:sdc upgrade-scripts /home/sdc/upgrade-scripts
34COPY --chown=sdc:sdc startup.sh /home/sdc/
Avi Zivc175a0d2018-03-15 13:21:44 +020035
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000036RUN chmod 770 /home/sdc/startup.sh
Avi Zivc175a0d2018-03-15 13:21:44 +020037
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000038ENTRYPOINT [ "/home/sdc/startup.sh" ]