benzelleroehr | 4448627 | 2024-10-24 13:01:57 +0200 | [diff] [blame^] | 1 | FROM onap/policy-jdk-alpine:2.4.4 |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 2 | |
benzelleroehr | 4448627 | 2024-10-24 13:01:57 +0200 | [diff] [blame^] | 3 | USER root |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 4 | RUN addgroup sdc |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 5 | RUN adduser --gecos "sdc sdc,1,1,1" --disabled-password --ingroup sdc --shell /bin/sh sdc |
| 6 | USER sdc |
| 7 | RUN mkdir ~/.cassandra/ && \ |
| 8 | echo '[cql]' > ~/.cassandra/cqlshrc && \ |
| 9 | echo 'version=3.4.4' >> ~/.cassandra/cqlshrc |
| 10 | USER root |
| 11 | |
benzelleroehr | 4448627 | 2024-10-24 13:01:57 +0200 | [diff] [blame^] | 12 | RUN apk update && \ |
eschcam | 94176d7 | 2023-03-30 13:47:20 +0100 | [diff] [blame] | 13 | python3 -m pip install --upgrade pip && \ |
| 14 | pip3 install cqlsh==6.1.0 && \ |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 15 | mkdir ~/.cassandra/ && \ |
| 16 | echo '[cql]' > ~/.cassandra/cqlshrc && \ |
| 17 | echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \ |
| 18 | set -ex && \ |
benzelleroehr | 4448627 | 2024-10-24 13:01:57 +0200 | [diff] [blame^] | 19 | 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 |
sebdet | 30670ac | 2020-08-04 14:16:00 +0200 | [diff] [blame] | 34 | |
| 35 | USER sdc |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 36 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 37 | COPY --chown=sdc:sdc init_keyspaces.cql /home/sdc/ |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 38 | COPY --chown=sdc:sdc init_schemas.cql /home/sdc/ |
andre.schmid | b8bfef3 | 2021-08-12 23:05:15 +0100 | [diff] [blame] | 39 | COPY --chown=sdc:sdc upgrade-scripts /home/sdc/upgrade-scripts |
| 40 | COPY --chown=sdc:sdc startup.sh /home/sdc/ |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 41 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 42 | RUN chmod 770 /home/sdc/startup.sh |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 43 | |
MichaelMorris | a2abf6e | 2020-03-10 12:37:48 +0000 | [diff] [blame] | 44 | ENTRYPOINT [ "/home/sdc/startup.sh" ] |