Skip to content

Commit

Permalink
revising build system as per #24
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kraynyukhov committed Oct 19, 2018
1 parent bb5b22e commit 60c5e0f
Show file tree
Hide file tree
Showing 9 changed files with 113 additions and 5 deletions.
44 changes: 43 additions & 1 deletion buildRunEnv.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
#!/bin/bash

docker build -t lapps:runenv -f dockerfiles/Dockerfile.lapps-runenv.0.7.0 --force-rm .
if [ -f ./common.sh ]
then
source ./common.sh

export MANDATORY="UBUNTU BUILD"

chk_args "$@"

export UBUNTU_VERSION_CHOSEN=0

for i in xenial bionic
do
if [ "${UBUNTU}" == "${i}" ]
then
export UBUNTU_VERSION_CHOSEN=1
fi
done

export BUILD_TYPE_CHOSEN=0

for i in avx2 generic
do
if [ "${BUILD}" == "${i}" ]
then
export BUILD_TYPE_CHOSEN=1
fi
done

[ ${UBUNTU_VERSION_CHOSEN} ] || die "Use --ubuntu {xenial|bionic} - only these two ubuntu versions are supported"
[ ${BUILD_TYPE_CHOSEN} ] || die "Use --build {avx2|generic} - only these two build types are supported"


[ -f ./VERSION ] || die "No VERSION file in current directory"

export VERSION=$(cat ./VERSION)

docker build -t lapps:runenv.${VERSION}.${UBUNTU}.${BUILD} -f dockerfiles/Dockerfile.lapps-runenv.${VERSION}.${UBUNTU}.${BUILD} --force-rm .

else
echo "This file is supposed to be executed from within the LAppS build directory (clone of https://github.com/ITpC/LAppS.git)"
fi


32 changes: 32 additions & 0 deletions dockerfiles/Dockerfile.lapps-runenv.0.7.1.bionic.avx2
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:bionic

LABEL "co.new-web" "new WEB() LLP" version 1.0 maintainer "pk@new-web.co" description "LAppS run environment"

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get update \
&& apt-get dist-upgrade -y

RUN apt-get install -y apt-utils

RUN apt-get install -y luarocks

ENV WORKSPACE /tmp

WORKDIR ${WORKSPACE}

ADD https://github.com/ITpC/LAppS/raw/master/packages/lapps-0.7.1-avx2-amd64.deb ${WORKSPACE}/

WORKDIR ${WORKSPACE}

RUN ls -la ${WORKSPACE}/lapps-0.7.1-avx2-amd64.deb

RUN apt install -y ${WORKSPACE}/lapps-0.7.1-avx2-amd64.deb

RUN apt-get install -f -y

RUN echo "LAppS-0.7.1 is installed under /opt/lapps prefix. To run LAppS use /opt/lapps/bin/lapps [-d] command. -d is an optional argument do run LAppS as a deamon."

RUN echo "Several binaries are available: lapps, lapps.nostats, lapps.notstats.notls - for generic builds; and lapps.avx2, lapps.avx2.nostats, lapps.avx2.notstats.notls. See feature request #24 for details."

RUN echo "You may add/install libraries you want to use with LAppS from luarocks repository. You may twick this Dockerfile or do these operations within running container."
32 changes: 32 additions & 0 deletions dockerfiles/Dockerfile.lapps-runenv.0.7.1.bionic.generic
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:bionic

LABEL "co.new-web" "new WEB() LLP" version 1.0 maintainer "pk@new-web.co" description "LAppS run environment"

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get update \
&& apt-get dist-upgrade -y

RUN apt-get install -y apt-utils

RUN apt-get install -y luarocks

ENV WORKSPACE /tmp

WORKDIR ${WORKSPACE}

ADD https://github.com/ITpC/LAppS/raw/master/packages/lapps-0.7.1-generic-amd64.deb ${WORKSPACE}/

WORKDIR ${WORKSPACE}

RUN ls -la ${WORKSPACE}/lapps-0.7.1-generic-amd64.deb

RUN apt install -y ${WORKSPACE}/lapps-0.7.1-generic-amd64.deb

RUN apt-get install -f -y

RUN echo "LAppS-0.7.1 is installed under /opt/lapps prefix. To run LAppS use /opt/lapps/bin/lapps [-d] command. -d is an optional argument do run LAppS as a deamon."

RUN echo "Several binaries are available: lapps, lapps.nostats, lapps.notstats.notls - for generic builds; and lapps.avx2, lapps.avx2.nostats, lapps.avx2.notstats.notls. See feature request #24 for details."

RUN echo "You may add/install libraries you want to use with LAppS from luarocks repository. You may twick this Dockerfile or do these operations within running container."
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ ENV WORKSPACE /tmp

WORKDIR ${WORKSPACE}

ADD https://github.com/ITpC/LAppS/raw/master/packages/lapps-0.7.0-avx2-amd64.deb ${WORKSPACE}/
ADD https://github.com/ITpC/LAppS/raw/master/packages/lapps-0.7.1-generic-amd64.deb ${WORKSPACE}/

WORKDIR ${WORKSPACE}

RUN ls -la ${WORKSPACE}/lapps-0.7.0-avx2-amd64.deb
RUN ls -la ${WORKSPACE}/lapps-0.7.1-generic-amd64.deb

RUN apt install -y ${WORKSPACE}/lapps-0.7.0-avx2-amd64.deb
RUN apt install -y ${WORKSPACE}/lapps-0.7.1-generic-amd64.deb

RUN apt-get install -f -y

RUN echo "LAppS-0.7.0 is installed under /opt/lapps prefix. To run LAppS use /opt/lapps/bin/lapps [-d] command. -d is an optional argument do run LAppS as a deamon."
RUN echo "LAppS-0.7.1 is installed under /opt/lapps prefix. To run LAppS use /opt/lapps/bin/lapps [-d] command. -d is an optional argument do run LAppS as a deamon."

RUN echo "Several binaries are available: lapps, lapps.nostats, lapps.notstats.notls - for generic builds; and lapps.avx2, lapps.avx2.nostats, lapps.avx2.notstats.notls. See feature request #24 for details."

RUN echo "You may add/install libraries you want to use with LAppS from luarocks repository. You may twick this Dockerfile or do these operations within running container."
Binary file added packages/bionic/lapps-0.7.1-avx2-amd64.deb
Binary file not shown.
Binary file added packages/bionic/lapps-0.7.1-generic-amd64.deb
Binary file not shown.
Binary file modified packages/xenial/lapps-0.7.1-avx2-amd64.deb
Binary file not shown.
Binary file added packages/xenial/lapps-0.7.1-generic-amd64.deb
Binary file not shown.

0 comments on commit 60c5e0f

Please # to comment.