2018-06-05 21:54:06 +03:00
|
|
|
# Multistage docker build, requires docker 17.05
|
|
|
|
|
|
|
|
# builder stage
|
2018-09-20 21:58:23 +03:00
|
|
|
FROM rust:1.29.0 as builder
|
2018-06-05 21:54:06 +03:00
|
|
|
|
|
|
|
RUN set -ex && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get --no-install-recommends --yes install \
|
|
|
|
clang \
|
|
|
|
libclang-dev \
|
|
|
|
llvm-dev \
|
|
|
|
libncurses5 \
|
|
|
|
libncursesw5 \
|
|
|
|
cmake \
|
|
|
|
git
|
|
|
|
|
|
|
|
WORKDIR /usr/src/grin
|
|
|
|
|
|
|
|
# Copying Grin
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
# Building Grin
|
|
|
|
RUN cargo build --release
|
|
|
|
|
|
|
|
# runtime stage
|
|
|
|
FROM debian:9.4
|
|
|
|
|
2018-09-25 23:18:17 +03:00
|
|
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales openssl
|
2018-06-05 21:54:06 +03:00
|
|
|
|
|
|
|
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
|
|
dpkg-reconfigure --frontend=noninteractive locales && \
|
|
|
|
update-locale LANG=en_US.UTF-8
|
|
|
|
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
|
|
|
|
COPY --from=builder /usr/src/grin/target/release/grin /usr/local/bin/grin
|
|
|
|
|
2018-09-25 23:18:17 +03:00
|
|
|
WORKDIR /root/.grin
|
|
|
|
RUN grin server config && \
|
|
|
|
sed -i -e 's/run_tui = true/run_tui = false/' grin-server.toml
|
2018-06-05 21:54:06 +03:00
|
|
|
|
2018-09-25 23:18:17 +03:00
|
|
|
EXPOSE 13413 13414 13415 13416
|
2018-06-05 21:54:06 +03:00
|
|
|
|
|
|
|
ENTRYPOINT ["grin", "server", "run"]
|