blob: 4f73e9e3fdd5b9a304887dec34f713b083a3ac2e [file] [log] [blame]
benzelleroehr44486272024-10-24 13:01:57 +02001FROM onap/policy-jdk-alpine:2.4.4
sebdet30670ac2020-08-04 14:16:00 +02002
benzelleroehr44486272024-10-24 13:01:57 +02003USER root
sebdet30670ac2020-08-04 14:16:00 +02004RUN addgroup sdc
sebdet30670ac2020-08-04 14:16:00 +02005RUN adduser --gecos "sdc sdc,1,1,1" --disabled-password --ingroup sdc --shell /bin/sh sdc
6USER sdc
7RUN mkdir ~/.cassandra/ && \
8 echo '[cql]' > ~/.cassandra/cqlshrc && \
9 echo 'version=3.4.4' >> ~/.cassandra/cqlshrc
10USER root
11
benzelleroehr44486272024-10-24 13:01:57 +020012RUN apk update && \
eschcam94176d72023-03-30 13:47:20 +010013 python3 -m pip install --upgrade pip && \
14 pip3 install cqlsh==6.1.0 && \
sebdet30670ac2020-08-04 14:16:00 +020015 mkdir ~/.cassandra/ && \
16 echo '[cql]' > ~/.cassandra/cqlshrc && \
17 echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \
18 set -ex && \
benzelleroehr44486272024-10-24 13:01:57 +020019 apk add --no-cache \
20 wget \
21 build-base \
22 ruby \
23 ruby-dev \
24 libffi-dev \
25 libxml2-dev && \
26 gem install --no-update-sources \
27 public_suffix:5.1.1 multipart-post:2.4.1 etc:1.4.3 bundler:2.4.22 chef:14.15.6 \
28 faraday:2.8.1 minitar:0.12.1 berkshelf:7.0.10 \
29 io-console:0.7.2 \
30 webrick \
31 json \
32 --no-document && \
33 gem cleanup
sebdet30670ac2020-08-04 14:16:00 +020034
35USER sdc
Avi Zivc175a0d2018-03-15 13:21:44 +020036
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000037COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000038COPY --chown=sdc:sdc init_schemas.cql /home/sdc/
andre.schmidb8bfef32021-08-12 23:05:15 +010039COPY --chown=sdc:sdc upgrade-scripts /home/sdc/upgrade-scripts
40COPY --chown=sdc:sdc startup.sh /home/sdc/
Avi Zivc175a0d2018-03-15 13:21:44 +020041
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000042RUN chmod 770 /home/sdc/startup.sh
Avi Zivc175a0d2018-03-15 13:21:44 +020043
MichaelMorrisa2abf6e2020-03-10 12:37:48 +000044ENTRYPOINT [ "/home/sdc/startup.sh" ]