-
Notifications
You must be signed in to change notification settings - Fork 5
/
octave.docker
40 lines (29 loc) · 1.09 KB
/
octave.docker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# gnuoctave/octave
# Please follow docker best practices
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
# Docker images to build GNU Octave <https://www.octave.org>.
ARG OCTAVE_VERSION_MAJOR
FROM gnuoctave/octave-build:${OCTAVE_VERSION_MAJOR}
LABEL maintainer="Kai T. Ohlhus <[email protected]>"
ENV LAST_UPDATED=2024-10-15
# Update builder image with latest security updates
RUN apt-get --yes update && \
apt-get --yes upgrade && \
apt-get --yes clean && \
apt-get --yes autoremove && \
rm -Rf /var/lib/apt/lists/*
# Install Octave
ARG OCTAVE_VERSION
ARG GNU_MIRROR=https://ftpmirror.gnu.org/octave
RUN mkdir -p /tmp/build \
&& cd /tmp/build \
&& wget -q "${GNU_MIRROR}/octave-${OCTAVE_VERSION}.tar.gz" \
&& tar -xf octave-${OCTAVE_VERSION}.tar.gz \
&& cd octave-${OCTAVE_VERSION} \
&& ./configure ${OCTAVE_CONFIGURE_ARGS} \
F77_INTEGER_8_FLAG=${F77_INTEGER_8_FLAG} \
&& make -j8 \
&& make install \
&& rm -rf /tmp/build
WORKDIR /workdir
CMD ["octave-cli"]