numerical-methods-fortran icon indicating copy to clipboard operation
numerical-methods-fortran copied to clipboard

Dockerfile

Open TheFibonacciEffect opened this issue 11 months ago • 0 comments

Hi, in case anyone is struggling to get this running, here is a working docker file:

# Use Ubuntu 16.04 LTS
FROM ubuntu:16.04

# Install required tools, libraries, and dependencies
RUN apt-get update && \
    apt-get install -y wget libgl1 libx11-6 libxm4 libxt6 build-essential gnupg gcc gfortran && \
    apt-get install -y libx11-dev pgplot5 && \
    apt-get clean

# Install DISLIN
RUN wget https://www.dislin.de/downloads/linux/i586_64/dislin-11.5.linux.i586_64.deb && \
    dpkg -i dislin-11.5.linux.i586_64.deb && \
    rm dislin-11.5.linux.i586_64.deb

# Copy the numerical-methods-fortran directory into the image
COPY numerical-methods-fortran /app/numerical-methods-fortran

# Set the working directory to the numerical-methods-fortran folder
WORKDIR /app/numerical-methods-fortran

# Run the make command to build the project
RUN make

# Specify the volume mount point inside the container (optional)
VOLUME ["/app"]

# Default command (optional)
CMD ["bash"]

in particular installing DISLIN and getting it to work for me was cumbersome, because they are using an old verision of gcc to compile it. So you have to use ubuntu lts.

Clone the repo, put this into a file called Dockerfile and use docker build -t ubuntu-dev:16.04 . as well as docker run -it --rm -v $(pwd):/app ubuntu-dev:16.04

TheFibonacciEffect avatar Nov 21 '24 13:11 TheFibonacciEffect