| 1 |
FROM centos:7 as build |
| 2 |
|
| 3 |
RUN yum install -y gcc-c++ make zlib-devel openssl-devel redhat-rpm-config |
| 4 |
|
| 5 |
RUN groupadd app && useradd -g app app |
| 6 |
RUN chown -R app:app /opt |
| 7 |
RUN chown -R app:app /usr/local |
| 8 |
|
| 9 |
WORKDIR /tmp |
| 10 |
RUN curl -O https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.tar.gz |
| 11 |
RUN tar zxvf cmake-3.14.0-Linux-x86_64.tar.gz |
| 12 |
RUN cp -rf cmake-3.14.0-Linux-x86_64/* /usr/ |
| 13 |
|
| 14 |
RUN yum install -y git |
| 15 |
|
| 16 |
# There is a bug in CMake where we cannot build from the root top folder |
| 17 |
# So we build from /opt |
| 18 |
COPY --chown=app:app . /opt |
| 19 |
WORKDIR /opt |
| 20 |
|
| 21 |
USER app |
| 22 |
RUN [ "make", "ws_no_python" ] |
| 23 |
RUN [ "rm", "-rf", "build" ] |
| 24 |
|
| 25 |
ENTRYPOINT ["ws"] |
| 26 |
CMD ["--help"] |