blob: 8408d2f51cf45e6e07f6d525c0791527babfe881 [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
13RUN apt-get update && apt-get install -y python-pip && \
14 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/
sebdetdf353be2020-09-21 22:13:05 +020035COPY --chown=sdc:sdc alter_tables.cql /home/sdc/
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000036COPY --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" ]