2019-09-13 12:46:52 +00:00
|
|
|
FROM ubuntu:18.04
|
2019-08-25 20:16:02 +00:00
|
|
|
|
2019-08-29 15:21:49 +00:00
|
|
|
# docker build -f docker/Dockerfile.nu-base -t nushell/nu-base .
|
2019-08-27 21:58:45 +00:00
|
|
|
# docker run -it nushell/nu-base
|
2019-08-25 20:16:02 +00:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y libssl-dev \
|
|
|
|
libxcb-composite0-dev \
|
2019-09-08 17:02:55 +00:00
|
|
|
pkg-config \
|
2020-03-04 18:58:20 +00:00
|
|
|
libx11-dev \
|
2019-09-08 17:02:55 +00:00
|
|
|
curl
|
2019-08-25 20:16:02 +00:00
|
|
|
|
2019-09-08 17:02:55 +00:00
|
|
|
ARG RELEASE=false
|
2019-08-25 20:16:02 +00:00
|
|
|
WORKDIR /code
|
2019-11-07 18:54:52 +00:00
|
|
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain "stable"
|
2019-09-08 17:02:55 +00:00
|
|
|
ENV PATH=/root/.cargo/bin:$PATH
|
2019-11-07 18:54:52 +00:00
|
|
|
RUN rustup update
|
2019-09-08 17:02:55 +00:00
|
|
|
COPY . /code
|
|
|
|
RUN echo "##vso[task.prependpath]/root/.cargo/bin" && \
|
|
|
|
rustc -Vv && \
|
2019-09-29 21:18:35 +00:00
|
|
|
if $RELEASE; then cargo build --release; \
|
2020-03-04 18:58:20 +00:00
|
|
|
cp target/release/nu /usr/local/bin; \
|
2019-09-08 17:02:55 +00:00
|
|
|
else cargo build; \
|
|
|
|
cp target/debug/nu /usr/local/bin; fi;
|
2019-08-25 20:16:02 +00:00
|
|
|
ENTRYPOINT ["nu"]
|
2019-09-08 17:02:55 +00:00
|
|
|
CMD ["-l", "info"]
|