Pamela Dragosh | 9bd4bf6 | 2017-03-30 12:46:08 -0400 | [diff] [blame] | 1 | FROM onap/policy/policy-os |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 2 | |
| 3 | |
| 4 | # note that in following command sequence, wget exit status is 1 even on success, |
| 5 | # so can't use && for conditional execution of next command |
| 6 | RUN \ |
| 7 | cd /tmp && \ |
| 8 | wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.14.2-01-bundle.tar.gz ; \ |
| 9 | mkdir /opt/nexus && cd /opt/nexus && \ |
| 10 | tar xfz /tmp/nexus-2.14.2-01-bundle.tar.gz && \ |
| 11 | useradd --create-home --shell /bin/bash nexus && \ |
| 12 | chown -R nexus * |
| 13 | |
| 14 | # make the sonatype-work directory persistent |
| 15 | VOLUME /opt/nexus/sonatype-work |
| 16 | |
| 17 | USER nexus |
| 18 | CMD bash -c "/opt/nexus/nexus-2.14.2-01/bin/nexus start && sleep 1000d" |
| 19 | |