mirror of
https://github.com/nushell/nushell.git
synced 2024-11-27 10:53:57 +01:00
b2c5af457e
This improves incremental build time when working on what was previously the root package. For example, previously all plugins would be rebuilt with a change to `src/commands/classified/external.rs`, but now only `nu-cli` will have to be rebuilt (and anything that depends on it).
27 lines
781 B
Docker
27 lines
781 B
Docker
FROM ubuntu:18.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 \
|
|
pkg-config \
|
|
libx11-dev \
|
|
curl
|
|
|
|
ARG RELEASE=false
|
|
WORKDIR /code
|
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain "stable"
|
|
ENV PATH=/root/.cargo/bin:$PATH
|
|
RUN rustup update
|
|
COPY . /code
|
|
RUN echo "##vso[task.prependpath]/root/.cargo/bin" && \
|
|
rustc -Vv && \
|
|
if $RELEASE; then cargo build --release; \
|
|
cp target/release/nu /usr/local/bin; \
|
|
else cargo build; \
|
|
cp target/debug/nu /usr/local/bin; fi;
|
|
ENTRYPOINT ["nu"]
|
|
CMD ["-l", "info"]
|