-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (37 loc) · 1.03 KB
/
Dockerfile
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
41
42
43
44
45
46
FROM ubuntu:20.04
LABEL maintainer="Valentino Lauciani <[email protected]>"
ENV DEBIAN_FRONTEND=noninteractive
ENV INITRD No
ENV FAKE_CHROOT 1
# install packages
RUN apt-get update \
&& apt-get dist-upgrade -y --no-install-recommends \
&& apt-get install -y \
vim \
git \
fort77
# Set 'root' pwd
WORKDIR /opt
RUN echo root:toor | chpasswd
# Set .bashrc
WORKDIR /opt
RUN echo "" >> /root/.bashrc \
&& echo "##################################" >> /root/.bashrc \
&& echo "alias ll='ls -l --color'" >> /root/.bashrc \
&& echo "" >> /root/.bashrc \
&& echo "export LC_ALL=\"C\"" >> /root/.bashrc \
&& echo "" >> /root/.bashrc
# Copy source
WORKDIR /opt/
RUN mkdir /opt/hypoellipse
COPY tot-pasq.f /opt/hypoellipse
COPY params.inc /opt/hypoellipse
# COpy entrypoint
COPY entrypoint.sh /opt/
RUN chmod 755 /opt/entrypoint.sh
# Compile
WORKDIR /opt/hypoellipse
RUN fort77 -v -c tot-pasq.f \
&& gcc -o hypoellipse tot-pasq.o -static -lf2c -lm
# Run Hypoc
ENTRYPOINT ["/opt/entrypoint.sh"]