nushell/docker/Dockerfile.nu-base
Vanessa Sochat 1f3f3d3105
adding missing docker dependencies openssl and pkgconfig
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-09-11 13:44:23 -04:00

28 lines
857 B
Docker

FROM ubuntu:16.04
# docker build -f docker/Dockerfile.nu-base -t nushell/nu-base .
# docker run -it nushell/nu-base
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y libssl-dev \
libxcb-composite0-dev \
libx11-dev \
libssl-dev \
pkg-config \
curl
ARG RELEASE=false
WORKDIR /code
COPY ./rust-toolchain ./rust-toolchain
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain `cat rust-toolchain`
ENV PATH=/root/.cargo/bin:$PATH
COPY . /code
RUN echo "##vso[task.prependpath]/root/.cargo/bin" && \
rustc -Vv && \
if $RELEASE; then cargo build --release && cargo run --release; \
cp target/release/nu /usr/local/bin; \
else cargo build; \
cp target/debug/nu /usr/local/bin; fi;
ENTRYPOINT ["nu"]
CMD ["-l", "info"]