-
Notifications
You must be signed in to change notification settings - Fork 44
/
Dockerfile
53 lines (49 loc) · 1.92 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
47
48
49
50
51
52
53
# Copyright (c) Kyle Shannon
# Distributed under the terms of the Modified BSD License.
#
# Note, to use this X11 application from within a container, you need to
# allow X11 connections from other hosts as well as extra
# command line options on the docker (or podman) run line. To access data
# from outside the narrow confines of the WindNinja container, you'll also
# need to specify a volume mount. By default, this container uses "/data" as
# a working directory. For instance, as an unpriviledged user
# using podman:
#
# mkdir $HOME/MyWindNinjaRuns
# xhost +
# podman run -ti --rm \
# -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \
# -v $HOME/MyWindNinjaRuns:/data:z \
# --env="QT_X11_NO_MITSHM=1" \
# --security-opt label=type:container_runtime_t \
# windninja:3.7.5
#
FROM ubuntu:20.04
MAINTAINER Kyle Shannon <[email protected]>
USER root
ADD . /opt/src/windninja/
SHELL [ "/usr/bin/bash", "-c" ]
ENV DEBIAN_FRONTEND noninteractive
ENV WM_PROJECT_INST_DIR /opt
RUN dpkg-reconfigure debconf --frontend=noninteractive && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y wget gnupg2 cmake git apt-transport-https ca-certificates \
software-properties-common sudo build-essential \
pkg-config g++ libboost-program-options-dev \
libboost-date-time-dev libboost-test-dev && \
cd /opt/src && \
DEBIAN_FRONTEND=noninteractive ./windninja/scripts/build_deps_ubuntu_2004.sh && \
rm -rf /var/lib/apt/lists
RUN cd /opt/src/windninja && \
mkdir build && \
cd /opt/src/windninja/build && \
cmake -D SUPRESS_WARNINGS=ON -DNINJAFOAM=ON .. && \
make -j4 && \
make install && \
ldconfig && \
cd /opt/src/windninja && \
/usr/bin/bash -c scripts/build_libs.sh
CMD /usr/bin/bash -c /usr/local/bin/WindNinja
VOLUME /data
WORKDIR /data