blob: 226654ddc3f7d6a9600e9df65624cef87d2fc42a [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 && \
28 apt-get update -y && \
29 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/
Avi Zivc175a0d2018-03-15 13:21:44 +020034
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000035COPY --chown=sdc:sdc init_schemas.cql /home/sdc/
Avi Zivc175a0d2018-03-15 13:21:44 +020036
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000037COPY --chown=sdc:sdc alter_tables.cql /home/sdc/
Ben David, Elad (eb7504)ee64a642019-11-03 16:19:16 +020038
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000039COPY --chown=sdc:sdc startup.sh /home/sdc/
Avi Zivc175a0d2018-03-15 13:21:44 +020040
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000041RUN chmod 770 /home/sdc/startup.sh
Avi Zivc175a0d2018-03-15 13:21:44 +020042
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000043ENTRYPOINT [ "/home/sdc/startup.sh" ]