Added Dockerfile to containerize elektron.

This commit is contained in:
Pradyumna Kaushik 2019-10-25 02:25:09 -04:00
parent 553c1f697c
commit f0213f6174

58
Dockerfile Normal file
View file

@ -0,0 +1,58 @@
# Copyright (C) 2018 spdf
#
# This file is part of Elektron.
#
# Elektron is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Elektron is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Elektron. If not, see <http://www.gnu.org/licenses/>.
#
FROM ubuntu:xenial
RUN apt-get update && apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common && \
apt-get install -yq ssh git
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.7
# Installing performance co-pilot.
RUN apt-get install -y pcp pcp-gui
# The name of the elektron executable.
ARG elektronexecutablename=elektron
ENV ELEKTRON_EXECUTABLE_NAME=$elektronexecutablename
# HOST:PORT of the mesos master.
ARG elektronmesosmasterlocation=localhost:5050
ENV ELEKTRON_MESOS_MASTER_LOCATION=$elektronmesosmasterlocation
# Workload to be scheduled.
ARG elektronworkload=workload_sample.json
ENV ELEKTRON_WORKLOAD=$elektronworkload
# Prefix of the log directory.
ARG elektronlogdirprefix=Elektron-Test-Run
ENV ELEKTRON_LOGDIR_PREFIX=$elektronlogdirprefix
# Creating directory into which the current directory is going to be mounted.
RUN mkdir /elektron
WORKDIR /elektron
CMD ["--help"]
ENTRYPOINT ./$ELEKTRON_EXECUTABLE_NAME -m $ELEKTRON_MESOS_MASTER_LOCATION -w $ELEKTRON_WORKLOAD -p $ELEKTRON_LOGDIR_PREFIX $@