2021-08-29 14:59:11 -04:00
|
|
|
FROM rustlang/rust:nightly AS build
|
|
|
|
COPY / /build
|
|
|
|
WORKDIR /build
|
|
|
|
RUN cargo build --release
|
|
|
|
|
|
|
|
FROM ubuntu:20.04 AS release
|
|
|
|
WORKDIR /root
|
2021-09-12 22:27:43 -04:00
|
|
|
RUN apt-get update --fix-missing && \
|
|
|
|
apt-get install --noconfirm -y build-essential checkinstall zlib1g-dev openssl
|
|
|
|
RUN apt-get -y install gcc
|
|
|
|
RUN apt-get -y remove openssl
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt-get -q update && apt-get -qy install wget make \
|
|
|
|
&& wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz \
|
|
|
|
&& tar -xzvf openssl-1.0.2g.tar.gz \
|
|
|
|
&& cd openssl-1.0.2g \
|
|
|
|
&& ./config \
|
|
|
|
&& make install \
|
|
|
|
&& ln -sf /usr/local/ssl/bin/openssl 'which openssl'
|
|
|
|
|
2021-08-29 14:59:11 -04:00
|
|
|
COPY --from=build /build/target/release/cms ./cms
|
2021-09-12 21:41:09 -04:00
|
|
|
CMD [ "./cms", "-r" ]
|
2021-08-29 14:59:11 -04:00
|
|
|
|