forked from NREL/docker-energyplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (35 loc) · 1.87 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
FROM ubuntu:14.04
MAINTAINER Nicholas Long [email protected]
# This is not ideal. The tarballs are not named nicely and EnergyPlus versioning is strange
ENV ENERGYPLUS_VERSION 8.7.0
ENV ENERGYPLUS_TAG v8.7.0
ENV ENERGYPLUS_SHA 78a111df4a
# This should be x.y.z, but EnergyPlus convention is x-y-z
ENV ENERGYPLUS_INSTALL_VERSION 8-7-0
# Downloading from Github
# e.g. https://github.com/NREL/EnergyPlus/releases/download/v8.3.0/EnergyPlus-8.3.0-6d97d074ea-Linux-x86_64.sh
ENV ENERGYPLUS_DOWNLOAD_BASE_URL https://github.com/NREL/EnergyPlus/releases/download/$ENERGYPLUS_TAG
ENV ENERGYPLUS_DOWNLOAD_FILENAME EnergyPlus-$ENERGYPLUS_VERSION-$ENERGYPLUS_SHA-Linux-x86_64.sh
ENV ENERGYPLUS_DOWNLOAD_URL $ENERGYPLUS_DOWNLOAD_BASE_URL/$ENERGYPLUS_DOWNLOAD_FILENAME
# Collapse the update of packages, download and installation into one command
# to make the container smaller & remove a bunch of the auxiliary apps/files
# that are not needed in the container
RUN apt-get update && apt-get install -y ca-certificates curl \
&& rm -rf /var/lib/apt/lists/* \
&& curl -SLO $ENERGYPLUS_DOWNLOAD_URL \
&& chmod +x $ENERGYPLUS_DOWNLOAD_FILENAME \
&& echo "y\r" | ./$ENERGYPLUS_DOWNLOAD_FILENAME \
&& rm $ENERGYPLUS_DOWNLOAD_FILENAME \
&& cd /usr/local/EnergyPlus-$ENERGYPLUS_INSTALL_VERSION \
&& rm -rf DataSets Documentation ExampleFiles WeatherData MacroDataSets PostProcess/convertESOMTRpgm \
PostProcess/EP-Compare PreProcess/FMUParser PreProcess/ParametricPreProcessor PreProcess/IDFVersionUpdater
# Remove the broken symlinks
RUN cd /usr/local/bin \
&& find -L . -type l -delete
# Add in the test files
ADD test /usr/local/EnergyPlus-$ENERGYPLUS_INSTALL_VERSION/test_run
RUN cp /usr/local/EnergyPlus-$ENERGYPLUS_INSTALL_VERSION/Energy+.idd \
/usr/local/EnergyPlus-$ENERGYPLUS_INSTALL_VERSION/test_run/
VOLUME /var/simdata
WORKDIR /var/simdata
CMD [ "/bin/bash" ]