diff --git a/octave/Dockerfile b/octave/Dockerfile index 57818e5..6247b1e 100644 --- a/octave/Dockerfile +++ b/octave/Dockerfile @@ -9,9 +9,9 @@ RUN apt-get autoclean && apt-get clean RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # prepare dir -RUN mkdir -p /usr/src/app +RUN mkdir /source -VOLUME ["/usr/src/app"] -WORKDIR /usr/src/app +VOLUME ["/source"] +WORKDIR /source CMD ["octave"] diff --git a/octave/README.md b/octave/README.md index ce8b0ce..711bb66 100644 --- a/octave/README.md +++ b/octave/README.md @@ -5,7 +5,7 @@ Lightweight ocatve development environment ## Usage ```sh -$ docker run --rm -it -v /local/source:/usr/src/app schickling/octave +$ docker run --rm -it -v $(pwd):/source schickling/octave ``` Mount your local source folder to the container and run it inside the container. diff --git a/rust/Dockerfile b/rust/Dockerfile index 6e2321c..48a6b02 100644 --- a/rust/Dockerfile +++ b/rust/Dockerfile @@ -2,19 +2,21 @@ FROM debian:wheezy MAINTAINER Johannes Schickling "schickling.j@gmail.com" # install curl (needed to install rust) -RUN apt-get update && apt-get install -y curl gdb gcc make +RUN apt-get update && apt-get install -y curl # install rust & cargo -RUN curl -s https://static.rust-lang.org/rustup.sh | sh +RUN curl -L https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz | tar xvz -C /opt/rust +RUN bash -c "ln -s /opt/rust/bin/{rustc,rustdoc} /usr/local/bin/" +RUN ls /opt/rust/bin # cleanup package manager RUN apt-get remove --purge -y curl && apt-get autoclean && apt-get clean RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # prepare dir -RUN mkdir -p /usr/src/app +RUN mkdir /source -VOLUME ["/usr/src/app"] -WORKDIR /usr/src/app +VOLUME ["/source"] +WORKDIR /source CMD ["bash"] diff --git a/rust/README.md b/rust/README.md index 73f823e..68b2c24 100644 --- a/rust/README.md +++ b/rust/README.md @@ -5,7 +5,7 @@ Nightly Rust build including Cargo and GDB ## Usage ```sh -$ docker run --rm -it -v /local/source:/usr/src/app schickling/rust +$ docker run --rm -it -v $(pwd):/source schickling/rust ``` Mount your local source folder to the container and compile & run code inside.