blob: 33d8738278da8dc831230860c672fcdc39851f9e [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 && \
sebdet30670ac2020-08-04 14:16:00 +020019 apt-get install -y \
20 make \
21 gcc \
22 ruby \
23 ruby-dev \
24 libffi-dev \
25 libxml2-dev && \
26 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 +020027 apt-get update -y && apt-get remove bash -y --allow-remove-essential && \
sebdet30670ac2020-08-04 14:16:00 +020028 apt-get install -y binutils && apt-get clean && gem cleanup
sebdetdf353be2020-09-21 22:13:05 +020029
sebdet30670ac2020-08-04 14:16:00 +020030USER sdc
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000031COPY --chown=sdc:sdc chef-solo /home/sdc/chef-solo/
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000032COPY --chown=sdc:sdc chef-repo/cookbooks /home/sdc/chef-solo/cookbooks/
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000033COPY --chown=sdc:sdc startup.sh /home/sdc/
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020034
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000035RUN chmod 770 /home/sdc/startup.sh
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020036
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000037ENTRYPOINT [ "/home/sdc/startup.sh" ]
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020038