Commit a7bc4f86 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema

Add Dockerfile

parent f4149e09
# Install the base image through https://github.com/ds82/ubuntu-hardy-8.04-i386-docker
# We use an old ubuntu because g77 is not supported in newer ubuntu's
FROM ubuntu:8.04
# Install dependencies
RUN apt-get update && apt-get install -y build-essential git tcsh g77 wget vim libx11-dev libncursesw5-dev
RUN useradd -ms /bin/tcsh newstar
USER newstar
# Obtain source code
WORKDIR /home/newstar
RUN wget --no-check-certificate -q https://github.com/tammojan/Newstar/archive/master.tar.gz
RUN tar xf master.tar.gz && mv Newstar-master/* . && rmdir Newstar-master && rm master.tar.gz
# Set required environment variables for newstar, this replaces the logic in $n_root/src/sys
ENV n_site=docker \
n_install=li \
n_hosts=docker-newstar \
n_ftp=ftp.astron.nl \
n_root=/home/newstar \
n_hlp=/home/newstar/hlp
# Initialize paths etc at tcsh login
RUN echo 'source $n_root/src/sys/newstar_env.csh \nsource $n_root/src/sys/newstar_init.csh' >> /home/newstar/.cshrc
# Build newstar
WORKDIR /home/newstar/src
RUN tcsh -c 'nup build -u wntinc'
RUN tcsh -c 'nup build -u -t:exe wntinc'
RUN tcsh -c 'nup build -u all'
WORKDIR /home/newstar
ENTRYPOINT tcsh
FROM newstar
# The following is only necessary for generating the documentation
USER root
RUN apt-get update && apt-get install -y imagemagick texlive-full
USER newstar
# Documentation: convert xbm into png since modern webbrowsers don't understand xbm
RUN cd $n_hlp && find . -name '*.xbm' -exec sh -c 'convert $0 ${0%.xbm}.png' {} \;
RUN cd $n_hlp && find . -name '*.html' -exec sed -i -e 's/\.xbm/.png/g' {} \;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment