blob: af87d3db34276b8e008208105bef4a1713a1e981 [file] [log] [blame]
sebdet30670ac2020-08-04 14:16:00 +02001FROM onap/policy-jdk-debian:2.0.1
2
3#RUN addgroup --gid 1000 sdc
4RUN addgroup sdc
5#RUN adduser --gecos "sdc sdc,1,1,1" -u 1000 --disabled-password --ingroup sdc --shell /bin/sh sdc
6RUN adduser --gecos "sdc sdc,1,1,1" --disabled-password --ingroup sdc --shell /bin/sh sdc
7USER sdc
8RUN mkdir ~/.cassandra/ && \
9 echo '[cql]' > ~/.cassandra/cqlshrc && \
10 echo 'version=3.4.4' >> ~/.cassandra/cqlshrc
11USER root
12
vasraz855a4342021-08-16 13:45:06 +010013RUN apt-get update --allow-releaseinfo-change && apt-get install -y python-pip && \
sebdet30670ac2020-08-04 14:16:00 +020014 pip install cqlsh && \
15 mkdir ~/.cassandra/ && \
16 echo '[cql]' > ~/.cassandra/cqlshrc && \
17 echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \
18 set -ex && \
19 pip install cqlsh && \
20 apt-get install -y \
21 make \
22 gcc \
23 ruby \
24 ruby-dev \
25 libffi-dev \
26 libxml2-dev && \
27 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 +020028 apt-get update -y && apt-get remove bash -y --allow-remove-essential && \
sebdet30670ac2020-08-04 14:16:00 +020029 apt-get install -y binutils && apt-get clean && gem cleanup
30
31USER sdc
Avi Zivc175a0d2018-03-15 13:21:44 +020032
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000033COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000034COPY --chown=sdc:sdc init_schemas.cql /home/sdc/
andre.schmidb8bfef32021-08-12 23:05:15 +010035COPY --chown=sdc:sdc upgrade-scripts /home/sdc/upgrade-scripts
36COPY --chown=sdc:sdc startup.sh /home/sdc/
Avi Zivc175a0d2018-03-15 13:21:44 +020037
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000038RUN chmod 770 /home/sdc/startup.sh
Avi Zivc175a0d2018-03-15 13:21:44 +020039
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000040ENTRYPOINT [ "/home/sdc/startup.sh" ]