sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 1 | FROM onap/policy-jdk-debian:2.0.1 |
| 2 | |
| 3 | #RUN addgroup --gid 1000 sdc |
| 4 | RUN addgroup sdc |
| 5 | #RUN adduser --gecos "sdc sdc,1,1,1" -u 1000 --disabled-password --ingroup sdc --shell /bin/sh sdc |
| 6 | RUN adduser --gecos "sdc sdc,1,1,1" --disabled-password --ingroup sdc --shell /bin/sh sdc |
| 7 | USER sdc |
| 8 | RUN mkdir ~/.cassandra/ && \ |
| 9 | echo '[cql]' > ~/.cassandra/cqlshrc && \ |
| 10 | echo 'version=3.4.4' >> ~/.cassandra/cqlshrc |
| 11 | USER root |
| 12 | |
| 13 | RUN 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 && \ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 28 | apt-get update -y && apt-get remove bash -y --allow-remove-essential && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 29 | apt-get install -y binutils && apt-get clean && gem cleanup |
| 30 | |
| 31 | USER sdc |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 32 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 33 | COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/ |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 34 | COPY --chown=sdc:sdc init_schemas.cql /home/sdc/ |
sebdet | df353be | 2020-09-21 22:13:05 +0200 | [diff] [blame] | 35 | COPY --chown=sdc:sdc alter_tables.cql /home/sdc/ |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 36 | COPY --chown=sdc:sdc startup.sh /home/sdc/ |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 37 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 38 | RUN chmod 770 /home/sdc/startup.sh |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 39 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 40 | ENTRYPOINT [ "/home/sdc/startup.sh" ] |