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