Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
firstline11
linenumberstrue
# sample dockerfile
# installs octave and necessary packages

FROM ubuntu

USER root

RUN apt-get update && \
    apt-get install -y gnuplot \
    less \
    libnetcdf-dev \
      octave \
      liboctave-dev && \
    apt-get clean

RUN octave --no-gui --eval "pkg install -verbose -forge -auto netcdf"
RUN octave --no-gui --eval "pkg install -verbose -forge -auto io"
RUN octave --no-gui --eval "pkg install -verbose -forge -auto statistics"

RUN octave --no-gui --eval "pkg load statistics"


Other useful hints:

octave uses argv() to get the command line arguments. argv(){1} being the first after the script itself, followed by argv(){2} etc.

pkg('load', 'statistics');

is how packages are loaded.