forked from butlerx/wetty
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.deploy
59 lines (43 loc) · 1.53 KB
/
Dockerfile.deploy
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
47
48
49
50
51
52
53
54
55
56
57
58
59
# --- build Quantum Espresso ---
FROM debian:jessie as qe-builder
RUN apt-get -y update && \
apt-get install -y gfortran make git tar bash && \
rm -rf /var/lib/apt/lists/*
RUN git clone https://gitlab.com/QEF/q-e.git
WORKDIR /q-e
RUN ./configure LDFLAGS="-static-libgfortran -static-libgcc -Bstatic"
RUN make all
# --- build Hugo ---
FROM klakegg/hugo:0.53-onbuild AS hugo
# --- runtime container ---
FROM node:8.15.0-jessie
MAINTAINER d.kramer@soton.ac.uk
RUN apt-get update -y && \
apt-get install -y python bash git nano vim && \
rm -rf /var/lib/apt/lists/*
# Create a custom group for tutorial users
RUN addgroup --gid 2000 tutorial
# Copy quantum espresso
COPY --from=qe-builder /q-e/bin/* /opt/q-e/
RUN for f in $(ls /opt/q-e); do ln -s /opt/q-e/$f /usr/bin; done
RUN mkdir -p /potentials && \
cd /potentials && curl -O https://www.quantum-espresso.org/upf_files/Cu.pbe-dn-kjpaw_psl.0.2.UPF && \
cd /potentials && curl -O https://www.quantum-espresso.org/upf_files/Na.pbe-spn-kjpaw_psl.0.2.UPF && \
cd /potentials && curl -O https://www.quantum-espresso.org/upf_files/N.pbe-n-kjpaw_psl.0.1.UPF
ENV PSEUDO_DIR=/potentials
ENV TMP_DIR=/tmp
RUN mkdir -p /tmp && chmod a+w /tmp
# Shell
COPY terminal/prompt.sh /etc/profile.d/prompt.sh
COPY terminal/env.sh /etc/profile.d/env.sh
COPY terminal/motd /etc/motd
COPY terminal/bashrc /etc/skel/.bashrc
EXPOSE 3000
WORKDIR /app
# Server-side application
COPY bin /app/bin
COPY package.json /app
RUN yarn
# Copy static webpage
COPY --from=hugo /onbuild /app/public
CMD node bin